Пример #1
0
        public void When_invalid_number_of_arguments_supplied_should_throw_arguments_length_exception(string input)
        {
            var sut  = new ArgumentsValidatorBuilder().Build();
            var args = input.Split(' ');

            Assert.Throws <ArgumentsLengthException>(() => sut.Validate(args));
        }
Пример #2
0
        public void When_switch_is_invalid_and_2_arguments_supplied_should_throw_invalid_switch_exception(string input)
        {
            var sut  = new ArgumentsValidatorBuilder().Build();
            var args = input.Split(' ');

            Assert.Throws <InvalidSwitchException>(() => sut.Validate(args));
        }
Пример #3
0
        public void When_switch_is_valid_and_2_arguments_supplied_should_validate_successfully(string input)
        {
            var sut  = new ArgumentsValidatorBuilder().Build();
            var args = input.Split(' ');

            sut.Validate(args);
        }