예제 #1
0
        public void Returns_No_Items_when_Item_Not_Found()
        {
            //Arrange
            IBook validBook = new MockBookManager() { Content = "This is a statement, and so is this." };
            var _author = new Author(validBook);

            //Act
            var repeatedWordInfo = _author.GetRepeatedWordCount();
            var word = repeatedWordInfo.Find(v => v.Item1 == "Test");

            //Assert

            Assert.IsNull(word);
        }
예제 #2
0
        public void Returns_Exact_Count_Of_Words()
        {
            //Arrange
            IBook validBook = new MockBookManager() { Content = "This is a statement, and so is this." };
            var _author = new Author(validBook);

            //Act
            var repeatedWordInfo = _author.GetRepeatedWordCount();
            var word = repeatedWordInfo.Find(v => v.Item1 == "this");

            //Assert

            Assert.IsNotNull(word);
            Assert.AreEqual(2,word.Item2);
        }