[Test] public void TestSectionReductionOfPhrase() { IResource newRes1 = Core.ResourceStore.NewResource("TestType"); indexer.AddDocumentHeading(newRes1.Id, "token1 token2 token3 token4. "); indexer.AddDocumentFragment(newRes1.Id, "token5 token4 token3 token2. And All of that finish will ever complain."); indexer.EndBatchUpdate(); Entry[] result = indexer.ProcessQueryInternal("(\"token2 token3\") [SU]"); AssertIfTrue("Failed to find", result.Length == 1); }
[Test] public void TestProximities() { // This is the main goal of this testing. indexer.ResourceProcessed += Handler_ProximitiesTest; IResource newRes = Core.ResourceStore.NewResource("TestType"); _savedID = newRes.Id; indexer.AddDocumentHeading(newRes.Id, "severall tokens in the subject"); indexer.AddDocumentFragment(newRes.Id, "token1 token20."); indexer.AddDocumentFragment(newRes.Id, " token8 token9 token10. "); indexer.EndBatchUpdate(); indexer.ResourceProcessed -= Handler_ProximitiesTest; }