public async Task GetRequestedUsers_ReturnList_RequestsExists_Happy() { //Act List <Users> result = (List <Users>) await _adminRepository.GetRequestingFarmers(); CollectionAssert.AllItemsAreInstancesOfType(result, typeof(Users)); }
public async Task GetRequestedUsers_ThrowsException_WhenException_Bad() { orchard1ContextMock.Setup(a => a.Users).Throws(new GeneralException()); await Assert.ThrowsExceptionAsync <GeneralException>(async() => await adminRepository.GetRequestingFarmers()); }
public async Task <IEnumerable <Users> > GetRequestingFarmers() { return(await _AdminData.GetRequestingFarmers()); }