Exemple #1
0
        public void SerializeToFileAndDeserialize_EmptyListValue_Test()
        {
            ScoresSerializer.SerializeScoresTo(new List <Score>(), "ScoresTest.bin");

            List <Score> actual = (List <Score>)ScoresSerializer.DeserializeScoresFrom("ScoresTest.bin");

            CollectionAssert.AreEqual(new List <Score>(), actual);
        }
Exemple #2
0
        public void SerializeToFileAndDeserialize_CorrectValues_Test()
        {
            ScoresSerializer.SerializeScoresTo(_scores, "ScoresTest.bin");

            List <Score> actual = (List <Score>)ScoresSerializer.DeserializeScoresFrom("ScoresTest.bin");

            CollectionAssert.AreEqual(_scores, actual);
        }