public async Task Should_Return_AllItems() { using (var context = new LearningItemContext(_fixture.Options)) { var handler = new FindItemsQueryHandler(context); var result = await handler.QueryAsync(FindItemsQuery.All); result.ToList().ShouldAllBeEquivalentTo(_fixture.Items); } }
public async Task Should_Return_BasedOnQuery() { using (var context = new LearningItemContext(_fixture.Options)) { var handler = new FindItemsQueryHandler(context); var result = await handler.QueryAsync(FindItemsQuery.ByWord("salut")); var item = result.Single(); item.ShouldBeEquivalentTo(_fixture.Items[0]); } }