test(network): update tests to reflect InitGamePayload changes

- Modified `MessageSerializerTest` to pass `handCard.getCards()` instead of `handCard` in `InitGamePayload` construction.
This commit is contained in:
Kieran Kihn
2025-12-02 12:28:12 +08:00
parent 271d89df0d
commit 4b498e3b4a

View File

@@ -195,7 +195,7 @@ TEST(MessageSerializerTest, SerializeInitGameMessage)
handCard.draw(Card(CardColor::GREEN, CardType::NUM3));
handCard.draw(Card(CardColor::YELLOW, CardType::REVERSE));
InitGamePayload payload{discardPile, handCard, 2};
InitGamePayload payload{discardPile, handCard.getCards(), 2};
Message message(MessageStatus::OK, MessagePayloadType::INIT_GAME, payload);
std::string result = MessageSerializer::serialize(message);
@@ -215,7 +215,7 @@ TEST(MessageSerializerTest, SerializeInitGameMessageWithEmptyPiles)
DiscardPile discardPile;
HandCard handCard;
InitGamePayload payload{discardPile, handCard, 0};
InitGamePayload payload{discardPile, handCard.getCards(), 0};
Message message(MessageStatus::OK, MessagePayloadType::INIT_GAME, payload);
std::string result = MessageSerializer::serialize(message);