예제 #1
0
        public void ReadBinaryTest()
        {
            var collection = new UnitInfoCollection
             {
            FileName = Path.Combine("..\\..\\TestFiles", Constants.UnitInfoCacheFileName),
             };

             collection.Read();
             Assert.AreEqual(20, collection.Count);
        }
예제 #2
0
        public void WriteAndReadBinaryTest()
        {
            var collection = new UnitInfoCollection
             {
            FileName = "TestUnitInfo.dat",
             };

             collection.Data = CreateTestList();
             collection.Write();
             collection.Data = null;
             collection.Read();
             Assert.IsTrue(CreateTestList().SequenceEqual(collection.Data));
        }