Exemplo n.º 1
0
        public void Returns_Count_Without_Any_Special_Characters()
        {
            //Arrange
            IBook validBook = new MockBookManager() { Content = "This is a &&&*^ simple Text" };
            var _author = new Author(validBook);

            //Act
            var repeatedWordInfo = _author.GetRepeatedWordInfo();
            //Assert
            Assert.AreEqual(5, repeatedWordInfo.Count());
        }
Exemplo n.º 2
0
        public void Returns_Zero_Count_For_InValid_Content()
        {
            //Arrange
            IBook validBook = new MockBookManager() { Content = "&*$*££." };
            var _author = new Author(validBook);

            //Act
            var repeatedWordInfo = _author.GetRepeatedWordInfo();
            //Assert
            Assert.AreEqual(0, repeatedWordInfo.Count());
        }
Exemplo n.º 3
0
        public void Returns_Count_For_Valid_Content()
        {
            //Arrange
            IBook validBook = new MockBookManager() { Content = "This is a statement, and so is this." };
            var _author = new Author(validBook);

            //Act
            var repeatedWordInfo = _author.GetRepeatedWordInfo();
            //Assert
            Assert.AreEqual(6, repeatedWordInfo.Count());
        }