Example #1
0
        public void TestReplaceWithNullOldStr()
        {
            var output = new OutputBuilder().Append(shortMessage);

            output.Replace(null, null);
            var parsedMessage = output.Parse(terminalOptions);

            Assert.AreEqual(shortMessage, parsedMessage);
        }
Example #2
0
        public void TestReplaceWithNullNewStr()
        {
            var replaceWord      = "big brown";
            var correctedMessage = "The  dog.";

            var output = new OutputBuilder().Append(shortMessage);

            output.Replace(replaceWord, null);
            var parsedMessage = output.Parse(terminalOptions);

            Assert.AreEqual(correctedMessage, parsedMessage);
        }
Example #3
0
        public void TestReplace()
        {
            var replaceWord      = "big";
            var replaceWithWord  = "small";
            var correctedMessage = "The small brown dog.";

            var output = new OutputBuilder().Append(shortMessage);

            output.Replace(replaceWord, replaceWithWord);
            var parsedMessage = output.Parse(terminalOptions);

            Assert.AreEqual(correctedMessage, parsedMessage);
        }