public async Task GetListAdminsTestAsync() { // Arrange mockSellerService.Setup(service => service.ListSellersAsync()).ReturnsAsync(await userHelper.GetUsers()); SellerController controller = new SellerController(mockSellerService.Object); // Act var result = await controller.ListSellers(); var okResult = Assert.IsType <OkObjectResult>(result); var model = Assert.IsType <List <UserViewDto> >(okResult.Value); // Assert Assert.Equal((await userHelper.GetUsers()).FirstOrDefault(f => f.Email == userHelper.EmailUser).Email, model.FirstOrDefault(f => f.Email == userHelper.EmailUser).Email); }