public async Task ShouldThrowErrorWhenInValidInformation() { var traineeUsersListQuery = new GetTraineeUsersListQuery(adminUserId: _adminUserId, tenantId: _tenantId, skip: 0, take: 0); await Assert.ThrowsAsync <NotFoundException>(async() => await _queryHandler.Handle(traineeUsersListQuery, CancellationToken.None)); }
public async Task ShouldGetModelForValidInformation() { var traineeUsersListQuery = new GetTraineeUsersListQuery(adminUserId: _adminUserId, tenantId: _tenantId, skip: 0, take: 11); var model = await _queryHandler.Handle(traineeUsersListQuery, CancellationToken.None); Assert.Null(model.Errors); Assert.Equal(expected: _context.TraineeUsers.FirstOrDefault()?.Name, actual: model.Items.Single().Name, ignoreCase: true); }