Ejemplo n.º 1
0
        public void Should_Throw_If_Process_Was_Not_Started()
        {
            // Given
            var fixture = new GenymotionDeviceAdbDisconnectFixture();

            fixture.GivenProcessCannotStart();

            // When
            fixture.Invoking(x => x.Run())

            // Then
            .ShouldThrow <CakeException>()
            .WithMessage("Genymotion: Process was not started.");
        }
Ejemplo n.º 2
0
        public void Should_Throw_If_Genymotion_Was_Not_Found()
        {
            // Given
            var fixture = new GenymotionDeviceAdbDisconnectFixture();

            fixture.GivenDefaultToolDoNotExist();

            // When
            fixture.Invoking(x => x.Run())

            // Then
            .ShouldThrow <CakeException>()
            .WithMessage("Genymotion: Could not locate executable.");
        }
Ejemplo n.º 3
0
        public void Should_Throw_If_Has_A_Non_Zero_Exit_Code()
        {
            // Given
            var fixture = new GenymotionDeviceAdbDisconnectFixture();

            fixture.GivenProcessExitsWithCode(1);

            // When
            fixture.Invoking(x => x.Run())

            // Then
            .ShouldThrow <CakeException>()
            .WithMessage("Genymotion: Process returned an error (exit code 1).");
        }