public static void UnParsing_instance_with_TimeSpan_returns_the_value_unquoted_in_command_line() { var options = new Options_With_TimeSpan { Duration = TimeSpan.FromMinutes(1) }; new Parser() .FormatCommandLine(options) .Should().Be("--duration 00:01:00"); }
public void Parse_TimeSpan() { // Fixture setup var expectedResult = new Options_With_TimeSpan { Duration = TimeSpan.FromMinutes(42) }; // Exercize system var result = InvokeBuild <Options_With_TimeSpan>( new[] { "--duration=00:42:00" }); // Verify outcome expectedResult.Should().BeEquivalentTo(((Parsed <Options_With_TimeSpan>)result).Value); // Teardown }