示例#1
0
        public void containsBookTest()
        {
            IndexLooker target = new IndexLooker(backEnd);

            Assert.IsTrue(target.ContainsBook("john"));
            Assert.IsTrue(target.ContainsBook("JOHN"));
            Assert.IsFalse(target.ContainsBook("FakeBook"));
        }
示例#2
0
        public void getChaptersTest()
        {
            IndexLooker target = new IndexLooker(backEnd);
            string book = "Jude";
            List<string> expected = new List<string>(new string[]
            {
                "1"
            });
            List<string> actual;
            actual = target.GetPossibleChapters(book);

            Assert.AreEqual(expected.Count, actual.Count);
            for (int i = 0; i < expected.Count; i++)
            {
                Assert.AreEqual(expected[i], actual[i]);
            }
        }
示例#3
0
 public SearchParsing(IPresenter presenter)
 {
     _presenter = presenter;
     _index = new IndexLooker(_presenter.Backend);
 }