Пример #1
0
        public void Should_Start_Arguments_With_CommandLine_Options()
        {
            // Given
            var fixture = new TalendCommandLinePublishJobFixture();

            // When
            var result = fixture.Run();

            // Then
            result.Args.ShouldStartWith(_commandLineArgumentPrefix);
        }
Пример #2
0
        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");
        }
Пример #3
0
        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");
        }
Пример #4
0
        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.");
        }
Пример #5
0
        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).");
        }
Пример #6
0
        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");
        }