Beispiel #1
0
        public void Should_Find_AppleSimulator_If_Tool_Path_Not_Provided()
        {
            // Given
            var fixture = new XCRunFindSimCtlFixture();

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

            // Then
            Assert.Equal("/Working/tools/xcrun", result.Path.FullPath);
        }
Beispiel #2
0
        public void Should_Throw_If_Does_Not_Exist()
        {
            // Given
            var fixture = new XCRunFindSimCtlFixture();

            fixture.GivenSettingsToolPathExist();

            // When
            fixture.Invoking(x => x.Run())
            // Then
            .Should().NotThrow <CakeException>();
        }
Beispiel #3
0
        public void Should_Throw_If_Has_A_Non_Zero_Exit_Code()
        {
            // Given
            var fixture = new XCRunFindSimCtlFixture();

            fixture.GivenProcessExitsWithCode(72);

            // When
            fixture.Invoking(x => x.Run())
            // Then
            .Should().Throw <CakeException>()
            .WithMessage("XcodeRun: Process returned an error (exit code 72).");
        }
Beispiel #4
0
        public void Should_Use_XCRun_Runner_From_Tool_Path_If_Provided(string toolPath, string expected)
        {
            // Given
            var fixture = new XCRunFindSimCtlFixture {
                Settings = { ToolPath = toolPath }
            };

            fixture.GivenSettingsToolPathExist();

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

            // Then
            result.Path.FullPath.Should().Be(expected);
        }