예제 #1
0
        public async Task GetRegisteredUsers_ReturnList_RequestsExists_Happy()
        {
            //Arrange

            //Act
            List <Users> result = (List <Users>) await _adminRepository.GetRegisteredFarmers();

            CollectionAssert.AllItemsAreInstancesOfType(result, typeof(Users));
        }
예제 #2
0
 public async Task GetRegisteredUsers_ThrowsException_WhenException_Bad()
 {
     orchard1ContextMock.Setup(a => a.Users).Throws(new GeneralException());
     await Assert.ThrowsExceptionAsync <GeneralException>(async() => await adminRepository.GetRegisteredFarmers());
 }
예제 #3
0
 public async Task <IEnumerable <Users> > GetRegisteredFarmers()
 {
     return(await _AdminData.GetRegisteredFarmers());
 }