Ejemplo n.º 1
0
 public void WeaponCollection_LoadThatExistAndValid_True()
 {
     // TODO: load returns true, expect WeaponCollection with count of 95.
     weaponCollection.Clear();
     Assert.IsTrue(weaponCollection.Load(inputPath));
     Assert.AreEqual(weaponCollection.Count, 95);
 }
Ejemplo n.º 2
0
 public void WeaponCollection_LoadThatDoesNotExist_FalseAndEmpty()
 {
     // TODO: load returns false, expect an empty WeaponCollection
     WeaponCollection.Clear();
     Assert.IsFalse(WeaponCollection.Load("Nothing"));
     Assert.AreEqual(0, WeaponCollection.Count);
 }
Ejemplo n.º 3
0
        public void WeaponCollection_SaveEmpty_TrueAndEmpty()
        {
            // After saving an empty WeaponCollection, load the file and expect WeaponCollection to be empty.

            weaponCollection.Clear();
            Assert.IsTrue(weaponCollection.Save(outputPath));
            Assert.IsTrue(weaponCollection.Load(outputPath));
            Assert.IsTrue(weaponCollection.Count == 0);
        }
Ejemplo n.º 4
0
        public void WeaponCollection_SaveEmpty_Load_ValidXml()
        {
            outputPath = CombineToAppPath(EMPTY_FILE_XML);
            WeaponCollection empty = new WeaponCollection();

            empty.Clear();
            empty.SaveAsXML(outputPath);
            empty.Load(outputPath);
            Assert.IsFalse(empty.Any());
        }