public AllUsersResponse GetAllUsers(AllUsersRequest request) { var response = new AllUsersResponse { ResponseStatus = ResponseStatus.Success }; var usersProvider = new UsersProvider(); try { if (request.ActionType == ActionType.Select) { response.Users = usersProvider.GetAllUsers(request); } else { response.ResponseStatus = ResponseStatus.Failure; response.ResponseDescription = "Not update action"; } } catch (Exception ex) { response.ResponseStatus = ResponseStatus.Failure; response.ResponseDescription = ex.Message; } return(response); }
public async Task GetAllUsers_ReturnsAllUsers() { //Arrange var context = _fixture.ZipPayDbContext; var usersProvider = new UsersProvider(context, _logger, _mapper); //Act var users = await usersProvider.GetAllUsers(); //Assert Assert.True(users.Any()); }