public void Should_Start_Arguments_With_CommandLine_Options() { // Given var fixture = new TalendCommandLinePublishRouteFixture(); // When var result = fixture.Run(); // Then result.Args.ShouldStartWith(_commandLineArgumentPrefix); }
public void Should_Throw_If_ArtifactRepositoryUsername_Is_Null() { // Given var fixture = new TalendCommandLinePublishRouteFixture(); 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 TalendCommandLinePublishRouteFixture(); 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 TalendCommandLinePublishRouteFixture(); 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 TalendCommandLinePublishRouteFixture(); 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_PublishRouteArguments() { // Given var fixture = new TalendCommandLinePublishRouteFixture(); fixture.ProjectName = "Test1"; fixture.RouteName = "route3"; fixture.JobGroup = "org.example"; fixture.ArtifactRepositoryUrl = "http://*****:*****@test.com;publishRoute route3 --group org.example -r http://localhost:8081/nexus/content/repositories/snapshots/ -u admin -p password -s -a route3"); }