private async void Find_Executed(object sender, ExecutedRoutedEventArgs e) { PdfSearchResult result; result = await container.Search(txtKeyword.Text); RefushResult(result); }
public void SearchTest() { var pdfs = GenarateTestPdf(100); container.PdfFileSet.AddRange(pdfs); container.SaveChanges(); for (int i = 0; i < 100; i++) { var result = container.Search(pdfs[i].Tittle.Substring(2)); result.Wait(100); Assert.IsTrue(result.Result.ByTittle.Any()); } for (int i = 0; i < 100; i++) { var result = container.Search(pdfs[i].Other1.Substring(2)); result.Wait(100); Assert.IsTrue(result.Result.ByOther1.Any()); } for (int i = 0; i < 100; i++) { var result = container.Search(pdfs[i].Other2.Substring(2)); result.Wait(100); Assert.IsTrue(result.Result.ByOther2.Any()); } for (int i = 0; i < 100; i++) { var result = container.Search(pdfs[i].Year / 10); result.Wait(100); Assert.IsTrue(result.Result.ByYear.Any()); } for (int i = 0; i < 100; i++) { var result = container.Search(pdfs[i].FileId); result.Wait(100); Assert.IsTrue(result.Result.ByNumber.Any()); } }