GitSharp.Core.Patch.Patch.getErrors C# (CSharp) Method

getErrors() public method

public getErrors ( ) : List
return List
        public List<FormatError> getErrors()
        {
            return _errors;
        }

Usage Example

Ejemplo n.º 1
0
 public void testError_CcTruncatedOld()
 {
     GitSharp.Core.Patch.Patch p = ParseTestPatchFile(PatchsDir + "testError_CcTruncatedOld.patch");
     Assert.AreEqual(1, p.getFiles().Count);
     Assert.AreEqual(3, p.getErrors().Count);
     {
         FormatError e = p.getErrors()[0];
         Assert.AreEqual(FormatError.Severity.ERROR, e.getSeverity());
         Assert.AreEqual(
             "Truncated hunk, at least 1 lines is missing for ancestor 1",
             e.getMessage());
         Assert.AreEqual(346, e.getOffset());
         Assert.IsTrue(e.getLineText().StartsWith(
                           "@@@ -55,12 -163,13 +163,15 @@@ public "));
     }
     {
         FormatError e = p.getErrors()[1];
         Assert.AreEqual(FormatError.Severity.ERROR, e.getSeverity());
         Assert.AreEqual(
             "Truncated hunk, at least 2 lines is missing for ancestor 2",
             e.getMessage());
         Assert.AreEqual(346, e.getOffset());
         Assert.IsTrue(e.getLineText().StartsWith(
                           "@@@ -55,12 -163,13 +163,15 @@@ public "));
     }
     {
         FormatError e = p.getErrors()[2];
         Assert.AreEqual(FormatError.Severity.ERROR, e.getSeverity());
         Assert.AreEqual("Truncated hunk, at least 3 new lines is missing", e
                         .getMessage());
         Assert.AreEqual(346, e.getOffset());
         Assert.IsTrue(e.getLineText().StartsWith(
                           "@@@ -55,12 -163,13 +163,15 @@@ public "));
     }
 }
All Usage Examples Of GitSharp.Core.Patch.Patch::getErrors