private async Task TestSearchAsync(TextIndexerGrain grain, List <Guid>?expected, string text, Scope target = Scope.Draft) { context.Scope = target; var result = await grain.SearchAsync(text, context); if (expected != null) { Assert.Equal(expected, result); } else { Assert.Empty(result); } }
public async Task Should_throw_exception_for_invalid_query() { await Assert.ThrowsAsync <ValidationException>(() => sut.SearchAsync("~hello", context)); }