public void SetAntExpressionWithMultipleEvaluations() { string expected = "Hey, do you want to hear the most annoying sound in the world? Mehhh! Mehhh!"; string actual = StringUtils.SetAntExpression("Hey, do you want to hear the most annoying sound in the world? ${foo}! ${foo}!", "foo", "Mehhh"); Assert.IsNotNull(actual); Assert.AreEqual(expected, actual); }
public void SetAntExpressionWithNullReplacementValue() { string expected = "That John Denver... he's full of ."; string actual = StringUtils.SetAntExpression("That John Denver... he's full of ${bleep}.", "bleep", null); Assert.IsNotNull(actual); Assert.AreEqual(expected, actual); }
public void SetAntExpressionWithEmptyStringExpression() { string expected = String.Empty; string actual = StringUtils.SetAntExpression(" ", "foo", "bar"); Assert.IsNotNull(actual); Assert.AreEqual(expected, actual); }