public async Task GetCurrentSupplies_ShouldReturnSupplyRequest() { // Assemble IEnumerable <Product> products = new List <Product> { new Product { Amount = 50, Barcode = 123, Discount = Discount.NoDiscount, Id = 5, Price = 4.99M, ProductName = "Kaas" }, new Product { Amount = 100, Barcode = 321, Discount = Discount.Expiry, Id = 10, Price = 14.99M, ProductName = "Bier" } }; IEnumerable <Supply> supplies = new List <Supply> { new Supply { Amount = 50, Barcode = 123 }, new Supply { Amount = 0, Barcode = 321 } }; _mockProductService.Setup(mock => mock.GetAllProducts()).Returns(Task.FromResult(products)); _mockMapperService.Setup(mock => mock.MapSupplyRequest(products)).Returns(supplies); _supplyService = new SupplyService(_mockProductService.Object, _mockMapperService.Object); // Act var actualSupplyRequest = await _supplyService.GetCurrentSupplies(); // Assert _mockProductService.Verify(mock => mock.GetAllProducts(), Times.Once); _mockMapperService.Verify(mock => mock.MapSupplyRequest(products), Times.Once); }