コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        public void SetAntExpressionWithEmptyStringExpression()
        {
            string expected = String.Empty;
            string actual   = StringUtils.SetAntExpression("     ", "foo", "bar");

            Assert.IsNotNull(actual);
            Assert.AreEqual(expected, actual);
        }