public void ParsesStandardUpdateRevisionOutput() { SvnClientStub task = new SvnClientStub(); task.BuildEngine = new MockBuild(); int actualRevision = task.GetRevisionFromLogEventsFromTextOutput("At revision 222", MessageImportance.Low); const int expectedRevision = 222; Assert.AreEqual(expectedRevision, actualRevision); }
public void ParsesStandardUpdateRevisionOutput() { SvnClientStub task = new SvnClientStub(); task.BuildEngine = new MockBuild(); int actualRevision = task.GetRevisionFromLogEventsFromTextOutput("At revision 222", MessageImportance.Low); const int expectedRevision = 222; Assert.AreEqual(expectedRevision, actualRevision); }
public void IgnoresSkippedPathsUpdateOutput() { SvnClientStub task = new SvnClientStub(); task.BuildEngine = new MockBuild(); // "Skipped paths..." is a potential output of svn.exe update and follows the actual revision output const string updateMsg = "Skipped paths: 1"; int actualRevision = task.GetRevisionFromLogEventsFromTextOutput(updateMsg, MessageImportance.Low); const int expectedRevision = -1; Assert.AreEqual(expectedRevision, actualRevision); }
public void IgnoresSkippedPathsUpdateOutput() { SvnClientStub task = new SvnClientStub(); task.BuildEngine = new MockBuild(); // "Skipped paths..." is a potential output of svn.exe update and follows the actual revision output const string updateMsg = "Skipped paths: 1"; int actualRevision = task.GetRevisionFromLogEventsFromTextOutput(updateMsg, MessageImportance.Low); const int expectedRevision = -1; Assert.AreEqual(expectedRevision, actualRevision); }