public void patch_patchObjTest() { // Patch Object. var p = new Patch{ start1 = 20, start2 = 21, length1 = 18, length2 = 17, diffs = new List<Diff>{ new Diff(Operation.Equal, "jump"), new Diff(Operation.Delete, "s"), new Diff(Operation.Insert, "ed"), new Diff(Operation.Equal, " over "), new Diff(Operation.Delete, "the"), new Diff(Operation.Insert, "a"), new Diff(Operation.Equal, "\nlaz") } }; const string strp = "@@ -21,18 +22,17 @@\n jump\n-s\n+ed\n over \n-the\n+a\n %0alaz\n"; Assert.AreEqual(strp, p.ToString(), "Patch: toString."); }
public void patch_patchObjTest() { // Patch Object. Patch p = new Patch(); p.start1 = 20; p.start2 = 21; p.length1 = 18; p.length2 = 17; p.diffs = new List<Diff> { new Diff(Operation.EQUAL, "jump"), new Diff(Operation.DELETE, "s"), new Diff(Operation.INSERT, "ed"), new Diff(Operation.EQUAL, " over "), new Diff(Operation.DELETE, "the"), new Diff(Operation.INSERT, "a"), new Diff(Operation.EQUAL, "\nlaz")}; string strp = "@@ -21,18 +22,17 @@\n jump\n-s\n+ed\n over \n-the\n+a\n %0alaz\n"; Assert.AreEqual(strp, p.ToString(), "Patch: toString."); }