private async Task Users_Can_Be_Queried() { // GIVEN 4 users await CreateUser("Homer", "Simpson", "*****@*****.**"); await CreateUser("Marge", "Simpson", "*****@*****.**"); await CreateUser("Moe", "Szyslak", "*****@*****.**"); await CreateUser("Ned", "Flanders", "*****@*****.**"); // WHEN querying a list of all users var userList = await _userQueryService.GetList(new UserListGetRequest()); // THEN // The number of returned records is correct Assert.Equal(4, userList.TotalRecords); }
public Task <ListResponse <UserListGetResponse> > GetList([FromServices] IUserQueryService service, [FromQuery] UserListGetRequest dto ) => service.GetList(dto);