public void Should_Start_Arguments_With_CommandLine_Options() { // Given var fixture = new TalendCommandLinePublishJobFixture(); // When var result = fixture.Run(); // Then result.Args.ShouldStartWith(_commandLineArgumentPrefix); }
public void Should_Throw_If_ArtifactRepositoryUsername_Is_Null() { // Given var fixture = new TalendCommandLinePublishJobFixture(); fixture.ArtifactRepositoryUsername = null; // When var result = Record.Exception(() => fixture.Run()); // Then result.ShouldBeType <ArgumentNullException>().ParamName.ShouldEqual("artifactRepositoryUsername"); }
public void Should_Throw_If_JobGroup_Is_Null() { // Given var fixture = new TalendCommandLinePublishJobFixture(); fixture.JobGroup = null; // When var result = Record.Exception(() => fixture.Run()); // Then result.ShouldBeType <ArgumentNullException>().ParamName.ShouldEqual("jobGroup"); }
public void Should_Throw_If_Process_Was_Not_Started() { // Given var fixture = new TalendCommandLinePublishJobFixture(); fixture.GivenProcessCannotStart(); // When var result = Record.Exception(() => fixture.Run()); // Then result.ShouldBeType <CakeException>().Message.ShouldEqual("Talend Command Line: Process was not started."); }
public void Should_Throw_If_Process_Has_A_Non_Zero_Exit_Code() { // Given var fixture = new TalendCommandLinePublishJobFixture(); fixture.GivenProcessExitsWithCode(1); // When var result = Record.Exception(() => fixture.Run()); // Then result.ShouldBeType <CakeException>() .Message.ShouldEqual("Talend Command Line: Process returned an error (exit code 1)."); }
public void Should_Add_PublishJobArguments() { // Given var fixture = new TalendCommandLinePublishJobFixture(); fixture.ProjectName = "Test1"; fixture.JobName = "job42"; fixture.JobGroup = "org.example"; fixture.ArtifactRepositoryUrl = "http://*****:*****@test.com;publishJob job42 --group org.example -r http://localhost:8081/nexus/content/repositories/snapshots/ -u admin -p password -s -t standalone -a job42"); }