Example #1
0
 public void WeaponCollection_Load_SaveAsXML_LoadXML_ValidXml(int expectedValue)
 {
     outputPath = CombineToAppPath(OUTPUT_FILE_XML);
     WeaponCollection.SaveAsXML(outputPath);
     Assert.IsTrue(WeaponCollection.LoadXML(outputPath));
     Assert.AreEqual(expectedValue, WeaponCollection.Count());
 }
Example #2
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());
        }