public void ProcessPayments_ShouldReturnSucessfull_WhenWithProperCardDetail() { //ExpiryDate expiryDate = new ExpiryDate() { Month = 07, Year = 2022 }; CardDetailDTO card = new CardDetailDTO() { Amount = 100, CardNumber = "1234567891234567", Currency = "Euro", Cvv = 123, ExpiryDate = "12/2020" }; JsonResultDTO result = new JsonResultDTO() { IsSuccess = true, TransactionId = new Guid(), }; mockPaymentGateService.Setup(x => x.MakePayment(card)).Returns(result); _paymentGatewayController = new PaymentGatewayController(mockPaymentGateService.Object); JsonResult paymentInfo = _paymentGatewayController.ProcessPayments(card); Assert.AreEqual(result, paymentInfo.Data); }