public void Test_Parsing_Fails_When_Both_Flag_Names_Are_Specified_For_A_Single_Flag() { var args = new[] { "-f", "--flag" }; var argContainer = new FlagTestArgumentContainer(); ParseStatus status = Parser.Parse(args, argContainer); Assert.That(status.Succeeded, Is.False); Assert.That(status.Errors, Is.Not.Empty); }
public void Test_Property_Is_Set_To_User_Defined_Value_When_Short_Flag_Is_Set() { var args = new []{"-f"}; var argContainer = new FlagTestArgumentContainer(); ParseStatus status = Parser.Parse(args, argContainer); Assert.That(status.Succeeded, Is.True); Assert.That(status.Errors, Is.Empty); Assert.That(argContainer.TestFlag, Is.EqualTo("foo")); }