public void ShouldSetFlagWithForwardSlash() { var argument = new Argument("f", null); var builtArgument = argumentBuilder.Build(argument); Assert.That(builtArgument, Is.EqualTo("/f")); }
public void ShouldSetSwitchFlag() { var argument = new Argument("Force", null); var builtArgument = argumentBuilder.Build(argument); Assert.That(builtArgument, Is.EqualTo("-Force")); }
public void ShouldSetFlagWithSingleHyphenIfOneCharacterFlag() { var argument = new Argument("f", null); var builtArgument = argumentBuilder.Build(argument); Assert.That(builtArgument, Is.EqualTo("-f")); }
public void ShouldSetFlagWithDoubleHyphenIfMultisCharacterFlag() { var argument = new Argument("f1", null); var builtArgument = argumentBuilder.Build(argument); Assert.That(builtArgument, Is.EqualTo("--f1")); }
public void ShouldOnlyUseValueIfNoFlagSpecifiedForArgument() { var argument = new Argument(null, "val"); var builtArgument = argumentBuilder.Build(argument); Assert.That(builtArgument, Is.EqualTo("val")); }
public void ShouldOnlyUseTheFlagIfValueIsNotAString() { var argument = new Argument("flag", true); var builtArgument = argumentBuilder.Build(argument); Assert.That(builtArgument, Is.EqualTo("--flag")); }
public void ShouldBeNullIfFlagIsNullAndValueIsNotString() { var argument = new Argument(null, new object()); var builtArgument = argumentBuilder.Build(argument); Assert.That(builtArgument, Is.Null); }
public void ShouldBeNullIfFlagAndValueAreNull() { var argument = new Argument(null, null); var builtArgument = argumentBuilder.Build(argument); Assert.That(builtArgument, Is.Null); }
public string BuildArgument(Argument argument) { return ArgumentBuilder.Build(argument); }
public string BuildArgument(Argument argument) { throw new System.NotImplementedException(); }
public void ShouldUseBothFlagAndValueIfValueIsString() { var argument = new Argument("flag", "val"); var builtArgument = argumentBuilder.Build(argument); Assert.That(builtArgument, Is.EqualTo("--flag val")); }