Ejemplo n.º 1
0
        public void GetInput_ReturnsSameInput_true()
        {
            Replace testSearch = new Replace("Hello", "Hello", "Hello");

            Assert.Equal("Hello", testSearch.GetInput());
        }
Ejemplo n.º 2
0
        public void FindAndReplace_ReplacePartialStringWithTarget_True()
        {
            Replace testSearch = new Replace("Mellow bellow yellow jello fellow", "ello", "text");

            Assert.Equal("Mtextw btextw ytextw jtext ftextw", testSearch.FindAndReplace());
        }
Ejemplo n.º 3
0
        public void FindAndReplace_ReplacesSingleWordInSentence_true()
        {
            Replace testSearch = new Replace("Hello World my old friend", "World", "Darkness");

            Assert.Equal("Hello Darkness my old friend", testSearch.FindAndReplace());
        }
Ejemplo n.º 4
0
        public void GetInput_StringLengthPlus1_true()
        {
            Replace testSearch = new Replace("Hello", "ello", "text");

            Assert.Equal("Htext", testSearch.FindAndReplace());
        }
Ejemplo n.º 5
0
        public void FindAndReplace_ReplacesSingleWord_true()
        {
            Replace testSearch = new Replace("Hello", "Hello", "World");

            Assert.Equal("World", testSearch.FindAndReplace());
        }