public void CreateAndDeleteChangelog() { string cpath = path + "\\Changelogs\\test.json"; Changelog c = new Changelog("test"); directory.CreateChangelog(c); Assert.IsTrue(File.Exists(cpath)); string text = File.ReadAllText(cpath); Assert.AreEqual(text, "{\r\n \"Hash\": \"test\",\r\n \"Added\": [],\r\n \"Modified\": [],\r\n \"Removed\": [],\r\n \"Renamed\": []\r\n}"); directory.DeleteChangelog(c); Assert.IsFalse(File.Exists(cpath)); }
/// <summary> /// Saves a Changelog to the file directory /// </summary> /// <param name="changelog"></param> public void CreateChangelog(Changelog changelog) { directory.CreateChangelog(changelog); }