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