public void ReadBinaryTest() { var collection = new UnitInfoCollection { FileName = Path.Combine("..\\..\\TestFiles", Constants.UnitInfoCacheFileName), }; collection.Read(); Assert.AreEqual(20, collection.Count); }
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)); }