public void ShouldReturnNullWhenEmptyArgumentListIsGiven() { // arrange string[] arguments = new string[1]; // act string result = ArgumentParsingHelper.GetArgumentValueFromArguments(arguments, "parameter:"); // assert Assert.That(result, Is.Null); }
public void ShouldThrowNullReferenceExceptionWhenGivenKeyIsNotFound() { // arrange string[] arguments = new string[1]; arguments[0] = "notgiven: valueToReturn"; // act string result = ArgumentParsingHelper.GetArgumentValueFromArguments(arguments, "parameter:"); // assert Assert.That(result, Is.Null); }
public void ShouldReturnValueAfterGivenOptionFromStringArrayWithOneItem() { // arrange string[] arguments = new string[1]; arguments[0] = "parameter: valueToReturn"; // act string result = ArgumentParsingHelper.GetArgumentValueFromArguments(arguments, "parameter:"); // assert Assert.That(result, Is.EqualTo(" valueToReturn")); }