Skip to content

Commit 5920541

Browse files
committed
add some tests around the parser state immediately after it has been initialised
1 parent 1c283b1 commit 5920541

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

FluentCommandLineParser.Tests/FluentCommandLineParserMSpecTests.cs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,36 @@ abstract class FluentCommandLineParserTestContext : TestContextBase<Fclp.FluentC
1111
Establish context = () => CreateSut();
1212
}
1313

14+
sealed class Constructor
15+
{
16+
class when_initialised : FluentCommandLineParserTestContext
17+
{
18+
It should_enable_case_sensitive = () =>
19+
sut.IsCaseSensitive.ShouldBeTrue();
20+
21+
It should_have_an_error_formatter = () =>
22+
sut.ErrorFormatter.ShouldNotBeNull();
23+
24+
It should_have_a_help_option = () =>
25+
sut.HelpOption.ShouldNotBeNull();
26+
27+
It should_have_a_option_factory = () =>
28+
sut.OptionFactory.ShouldNotBeNull();
29+
30+
It should_have_a_option_formatter = () =>
31+
sut.OptionFormatter.ShouldNotBeNull();
32+
33+
It should_have_a_option_validator = () =>
34+
sut.OptionValidator.ShouldNotBeNull();
35+
36+
It should_not_have_any_options_setup = () =>
37+
sut.Options.ShouldBeEmpty();
38+
39+
It should_have_an_parser_engine = () =>
40+
sut.ParserEngine.ShouldNotBeNull();
41+
}
42+
}
43+
1444
sealed class IsCaseSensitive
1545
{
1646
abstract class IsCaseSensitiveTestContext : FluentCommandLineParserTestContext { }

0 commit comments

Comments
 (0)