Example #1
0
        public void Should_Set_Working_Directory()
        {
            // Given
            var fixture = new GenymotionDeviceAdbDisconnectFixture();

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

            // Then
            Assert.Equal("/Working", result.Process.WorkingDirectory.FullPath);
        }
Example #2
0
        public void Should_Find_Genymotion_If_Tool_Path_Not_Provided()
        {
            // Given
            var fixture = new GenymotionDeviceAdbDisconnectFixture();

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

            // Then
            Assert.Equal("/Working/tools/gmtool.exe", result.Path.FullPath);
        }
Example #3
0
        public void Should_Add_Verbose_Flag_To_Arguments_If_Set(bool verbose, string expected)
        {
            // Given
            var fixture = new GenymotionDeviceAdbDisconnectFixture();

            fixture.Settings.Verbose = verbose;

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

            // Then
            result.Args.Should().Be(expected);
        }
Example #4
0
        public void Should_Add_Timeout_Flag_To_Arguments_If_Set(int?timeout, string expected)
        {
            // Given
            var fixture = new GenymotionDeviceAdbDisconnectFixture();

            fixture.Settings.Timeout = timeout;

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

            // Then
            result.Args.Should().Be(expected);
        }
Example #5
0
        public void Should_Add_Device_AdbDisconnect_Argument_With_DeviceIdentifier(string deviceIdentifier, string expected)
        {
            // Given
            var fixture = new GenymotionDeviceAdbDisconnectFixture();

            fixture.DeviceIdentifier = deviceIdentifier;

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

            // Then
            result.Args.Should().Be(expected);
        }
Example #6
0
        public void Should_Use_Genymotion_Runner_From_Tool_Path_If_Provided(string toolPath, string expected)
        {
            // Given
            var fixture = new GenymotionDeviceAdbDisconnectFixture {
                Settings = { ToolPath = toolPath }
            };

            fixture.GivenSettingsToolPathExist();

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

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