Example #1
0
        public void ShouldThrowOnNull()
        {
            var target = new ModuleNameInput {
                SuppliedInput = string.Empty
            };

            var exception = Should.Throw <InputException>(() => target.Validate());

            exception.Message.ShouldBe("Module name cannot be empty. Either fill the option or leave it out.");
        }
Example #2
0
        public void ShouldHaveDefault()
        {
            var target = new ModuleNameInput {
                SuppliedInput = null
            };

            var result = target.Validate();

            result.ShouldBe(string.Empty);
        }
Example #3
0
        public void ShouldReturnName()
        {
            var target = new ModuleNameInput {
                SuppliedInput = "TestName"
            };

            var result = target.Validate();

            result.ShouldBe("TestName");
        }
Example #4
0
        public void ShouldHaveHelpText()
        {
            var target = new ModuleNameInput();

            target.HelpText.ShouldBe(@"Module name used by reporters. Usually a project in your solution would be a module. | default: ''");
        }