Example #1
0
        public void ConvertArrayToStringTest()
        {
            //Arrange

            string[] myArray  = { "I", "have", "a", "cat" };
            string   expected = "I have a cat";

            //Act
            string actual = Part_B.ConvertArrayToString(myArray);


            //Assert
            Assert.AreEqual(expected, actual);
        }
Example #2
0
        public void CensorTest()
        {
            //Arrange

            string testInput = "I have a cat";

            char[]   dividingChars  = { ' ', ',', '.', ':', '\t' };
            string[] testInputArray = testInput.Split(dividingChars);

            string testWord = "cat";

            //Act
            string[] expected = { "I", "have", "a", "$$$$" };

            string[] actual = Part_B.Censor(testWord, testInputArray);


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