示例#1
0
 public void WeaponCollection_SaveEmpty_Load_ValidJson()
 {
     // Create an empty WeaponCollection, call SaveAsJSON() to empty.json,
     // and Load() the output and verify the WeaponCollection has a Count of 0
     inputPath  = CombineToAppPath("empty.json");
     outputPath = CombineToAppPath("empty.json");
     Assert.IsTrue(empty.SaveAsJSON(outputPath));
     Assert.IsTrue(weaponCollection.Load(inputPath));
     Assert.IsTrue(weaponCollection.Count == 0);
 }
示例#2
0
 public void WeaponCollection_Load_SaveAsJSON_Load_ValidJson()
 {
     // - Load the data2.csv and SaveAsJSON() it to weapons.json
     // and call Load() output and validate that there’s 95 entries
     inputPath  = CombineToAppPath("weapons.json");
     outputPath = CombineToAppPath("weapons.json");
     Assert.IsTrue(weaponCollection.SaveAsJSON(outputPath));
     Assert.IsTrue(weaponCollection.Load(inputPath));
     Assert.IsTrue(weaponCollection.Count() == 95);
 }
示例#3
0
 public void WeaponCollection_SaveEmpty_Load_ValidJson()
 {
     Assert.IsTrue(empty.SaveAsJSON(outputPathJSONEmpty));
     Assert.IsTrue(empty.Load(outputPathJSONEmpty));
     Assert.AreEqual(empty.Count, 0);
 }
示例#4
0
 public void WeaponCollection_Load_SaveAsJSON_Load_ValidJson()
 {
     Assert.IsTrue(weaponCollection.SaveAsJSON(outputPathJSON));
     Assert.IsTrue(weaponCollection.Load(outputPathJSON));
     Assert.AreEqual(weaponCollection.Count, 95);
 }