public void SearchTermIteratorTestFour() { var terms = SearchTermIterator.GetInstance("one two three four"); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("one two three four", terms.Next()); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("one two three", terms.Next()); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("two three four", terms.Next()); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("one two", terms.Next()); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("two three", terms.Next()); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("three four", terms.Next()); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("one", terms.Next()); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("two", terms.Next()); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("three", terms.Next()); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("four", terms.Next()); Assert.IsFalse(terms.HasNext()); }
public void SearchTermIteratorTestOne() { var terms = SearchTermIterator.GetInstance("test"); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("test", terms.Next()); Assert.IsFalse(terms.HasNext()); }
public void TestStringRemovingPunctuation() { var terms = SearchTermIterator.GetInstance("this: Is my, string"); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("this Is my string", terms.Next()); Assert.IsTrue(terms.HasNext()); }
public void SearchTermIteratorTestFiveRemovingExtraSpace() { var terms = SearchTermIterator.GetInstance("one two three four five"); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("one two three four five", terms.Next()); Assert.IsTrue(terms.HasNext()); }
public void MahiMahiHitTest() { var terms = SearchTermIterator.GetInstance("mahi mahi"); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("mahi mahi", terms.Next()); terms.ReportHit(); Assert.IsFalse(terms.HasNext()); }
public void SearchTermIteratorTestThreeFirstHit() { var terms = SearchTermIterator.GetInstance("one two three"); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("one two three", terms.Next()); terms.ReportHit(); Assert.IsFalse(terms.HasNext()); }
public void ShrimpWhiteTest() { var terms = SearchTermIterator.GetInstance("shrimp white"); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("shrimp white", terms.Next()); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("shrimp", terms.Next()); Assert.IsTrue(terms.HasNext()); Assert.AreEqual("white", terms.Next()); terms.ReportHit(); Assert.IsFalse(terms.HasNext()); }
public void NullInputTest() { var terms = SearchTermIterator.GetInstance(null); Assert.IsFalse(terms.HasNext()); }
public void EmptyInputTest() { var terms = SearchTermIterator.GetInstance(string.Empty); Assert.IsFalse(terms.HasNext()); }