public void WeaponCollection_Load_SaveAsJSON_Load_ValidJson(int expectedValue) { outputPath = CombineToAppPath(OUTPUT_FILE_JSON); WeaponCollection.SaveAsJSON(outputPath); Assert.IsTrue(WeaponCollection.Load(outputPath)); Assert.AreEqual(expectedValue, WeaponCollection.Count()); }
public void WeaponCollection_SaveEmpty_Load_ValidJson() { outputPath = CombineToAppPath(EMPTY_FILE_JSON); WeaponCollection empty = new WeaponCollection(); empty.Clear(); empty.SaveAsJSON(outputPath); empty.Load(outputPath); Assert.IsFalse(empty.Any()); }