test(network): add unit tests for NetworkClient and NetworkServer

- Introduced comprehensive test cases for `NetworkClient` and `NetworkServer` functionality.
- Added tests for constructor, `connect`, `send`, `read`, and round-trip scenarios in `NetworkClientTest`.
- Added tests for player management, message sending, and concurrent access in `NetworkServerTest`.
- Updated `CMakeLists.txt` to include `NetworkClientTest` and `NetworkServerTest` in the build configuration.
This commit is contained in:
Kieran Kihn
2025-11-29 18:52:08 +08:00
parent c2ccaaf17e
commit a10674fbd3
3 changed files with 1195 additions and 0 deletions

View File

@@ -11,6 +11,8 @@ add_executable(uno-game-test
unit/game/PlayerTest.cpp
unit/game/GameStateTest.cpp
unit/network/MessageSerializerTest.cpp
unit/network/NetworkServerTest.cpp
unit/network/NetworkClientTest.cpp
)
target_link_libraries(uno-game-test