public void ShouldThrowIfTrueAndNoOutputPath() { var target = new LogToFileInput { SuppliedInput = true }; var exception = Should.Throw <InputException>(() => target.Validate(null)); exception.Message.ShouldBe("Output path must be set if log to file is enabled"); }
public void ShouldValidate(bool?input, bool expected) { var target = new LogToFileInput { SuppliedInput = input }; var result = target.Validate("TestPath"); result.ShouldBe(expected); }
public void ShouldHaveHelpText() { var target = new LogToFileInput(); target.HelpText.ShouldBe(@"Makes the logger write to a file. Logging to file always uses loglevel trace. | default: 'False'"); }