Skip to content

Commit

Permalink
Oops, I reverted the nice enum error checking, but didn't revert the …
Browse files Browse the repository at this point in the history
…test.
  • Loading branch information
chadmyers committed Apr 19, 2012
1 parent 35fac9e commit 5557563
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/FubuCore.Testing/CommandLine/FlagTester.cs
Expand Up @@ -60,11 +60,10 @@ public void should_provide_useful_error_message_when_no_value_provided()
}

[Test]
public void should_provide_useful_error_message_for_invalid_enum_value()
public void should_catch_invalid_enum_value()
{
typeof(InvalidUsageException).ShouldBeThrownBy(() =>
forProp(x => x.EnumFlag).Handle(new FlagTarget(), new Queue<string>(new[] { "-e", "x" })))
.Message.ShouldEqual("'x' is not a valid value for flag [-e, --enum]");
typeof(ArgumentException).ShouldBeThrownBy(() =>
forProp(x => x.EnumFlag).Handle(new FlagTarget(), new Queue<string>(new[] { "-e", "x" })));
}
}

Expand Down

0 comments on commit 5557563

Please sign in to comment.