Exemplo n.º 1
0
            public void GivenEmptyArguments_ReturnsFalse()
            {
                var method            = _driver.GetType().GetMethod("Debug");
                var commandLineSwitch = new CommandLineSwitch(_driver, method);
                var arguments         = new Queue <string>();

                commandLineSwitch.TryActivate(arguments).Should().BeFalse();
            }
Exemplo n.º 2
0
            public void WhenConfigured_CallsMethod()
            {
                var method            = _driver.GetType().GetMethod("Debug");
                var commandLineSwitch = new CommandLineSwitch(_driver, method);
                var arguments         = new Queue <string>();

                arguments.Enqueue("-d");
                commandLineSwitch.TryActivate(arguments);
                _driver.ShowDiagnostics.Should().BeTrue();
            }
Exemplo n.º 3
0
            public void GivenNullArguments_ThrowsException()
            {
                var method            = _driver.GetType().GetMethod("Debug");
                var commandLineSwitch = new CommandLineSwitch(_driver, method);
                var exception         =
                    Assert.Throws <ArgumentNullException>(
                        () => commandLineSwitch.TryActivate(null));

                exception.ParamName.Should().Be("arguments");
            }