public void ReturnsDefaultValue_WhenRequiredIndexMissing() { var arg = ArgsUtil.GetArgument(new [] { "first" }, 1, "default"); Assert.That(arg, Is.EqualTo("default")); }
public void ReturnsIndexValue_WhenFound() { var arg = ArgsUtil.GetArgument(new[] { "first", "second" }, 1, "default"); Assert.That(arg, Is.EqualTo("second")); }
public void ReturnsDefaultValue_WithEmptyArgs() { var arg = ArgsUtil.GetArgument(new string[0], 0, "default"); Assert.That(arg, Is.EqualTo("default")); }