public async Task CanExecute() { var qry = new TypeaheadSmartSearchQuery(DocumentStore); var res = await qry.Execute(new SmartSearchQueryRequest { Collection = TypeaheadSmartSearchQuery.OrganizationsCollectionName, Qry = "*", CurrentPage = 0, PageSize = 10 }); Assert.That(res.Data.Count, Is.EqualTo(2)); }
public void unrecognized_collection_throws_argument_exception() { var qry = new TypeaheadSmartSearchQuery(DocumentStore); Assert.That(async() => { await qry.Execute(new SmartSearchQueryRequest { Collection = "unrecognized", Qry = "*", CurrentPage = 0, PageSize = 10 }); }, Throws.ArgumentException); }