public void ShouldReturnName() { var target = new ModuleNameInput { SuppliedInput = "TestName" }; var result = target.Validate(); result.ShouldBe("TestName"); }
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."); }
public void ShouldHaveDefault() { var target = new ModuleNameInput { SuppliedInput = null }; var result = target.Validate(); result.ShouldBe(string.Empty); }