Example #1
0
 public void TestEcho()
 {
     const string echoMsg = "Echo back what is given as argument";
     commandLine = new CommandLine("cmd", "/C echo " + echoMsg, workingDirectoryForSVNTests);
     var commandLineOutput = commandLine.Execute();
     Assert.IsFalse(commandLineOutput.Failed, "Should not fail echo");
     Assert.AreEqual(echoMsg, commandLineOutput.OutputStr.TrimEnd(), "Echo matches");
 }
Example #2
0
 public void TestRepository()
 {
     commandLine = new CommandLine("svn", "status --xml -v", workingDirectoryForSVNTests);
     var commandLineOutput = commandLine.Execute();
     Assert.Greater(commandLineOutput.OutputStr.Length, 0, "empty output");
     D.Log(commandLineOutput.OutputStr);
     var statusDatabase = SVNStatusXMLParser.SVNParseStatusXML(commandLineOutput.OutputStr);
     Assert.IsNotEmpty(statusDatabase.Keys, "statusDatabase not empty");
 }
Example #3
0
 public SyncCommandLineOperation(CommandLine command, CommandLine.ExecutionFinishedHandler finishHandler) : base(command, finishHandler)
 {
 }
Example #4
0
 public void TestErrorHandling()
 {
     commandLine = new CommandLine("svn", "", workingDirectoryForSVNTests);
     var commandLineOutput = commandLine.Execute();
     Assert.AreEqual(1, commandLineOutput.Exitcode, "commandLineOutput.exitcode");
     Assert.AreEqual("Type 'svn help' for usage.", commandLineOutput.ErrorStr.TrimEnd(), "commandLineOutput.errorStr");
     Assert.IsTrue(commandLineOutput.Failed, "commandLineOut.failed");
 }
Example #5
0
 protected CommandLineOperation(CommandLine command, CommandLine.ExecutionFinishedHandler finishHandler)
 {
     this.command = command;
     this.command.ExecutionFinished += finishHandler;
 }