public void containsBookTest() { IndexLooker target = new IndexLooker(backEnd); Assert.IsTrue(target.ContainsBook("john")); Assert.IsTrue(target.ContainsBook("JOHN")); Assert.IsFalse(target.ContainsBook("FakeBook")); }
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]); } }
public SearchParsing(IPresenter presenter) { _presenter = presenter; _index = new IndexLooker(_presenter.Backend); }