public void TestCustomTypeList() { var list = new List <MatchInfo>() { new MatchInfo() { matchId = 10, playerIds = new List <int> { 1, 2, 3 }, playerNames = new List <string> { "fer", "meh", "şek", "sek" } }, new MatchInfo() { matchId = 15, playerIds = new List <int> { 1, 2, 3 }, playerNames = new List <string> { "fer", "meh", "şek", "sek" } } }; _sendBridgeStream.WriteList(list); var data = _sendBridgeStream.Encode(); var receivePacket = new BridgeStream(data); var returnMatchInfo = receivePacket.ReadList <MatchInfo>(); Assert.AreEqual(list[0].matchId, returnMatchInfo[0].matchId); Assert.AreEqual(list[1].matchId, returnMatchInfo[1].matchId); }