예제 #1
0
 public void SetMerchantInfoOnTransactionModel_ArgumentsNull_Expect_Exception_Thrown()
 {
     // Arrange
     var target = new SettlementHelper(mockLogger, mockServiceClient);
     
     //Act
     target.SetMerchantInfoOnTransactionModel(null, null, null, null, null);
 }
예제 #2
0
            public void SetMerchantInfoOnTransactionModel_PaymentGatewayIsNotOgone_Expect_TransactionModelMerchantId_SetTo_EmptyString()
            {
                // Arrange
                var mockLogger = MockRepository.GenerateMock<ILogger>();
                var target = new SettlementHelper(mockLogger, mockServiceClient);
                var transactionModel = new Model.Settlement.TransactionModel() { };
                var booking = new Model.Booking.Booking() {};
                                 
                var business = new Model.Business.Business() {MerchantStatusEnum = MerchantStatusEnum.OwnMerchant};
                var businessChannel = new Model.Business.Business();
                var settlementPayments = new List<SettlementPaymentDto>() { new SettlementPaymentDto() { MerchantPSPID = "1", PaymentGatewayName = PaymentConstants.PAYMENT_GATEWAY_NAME_DATACASH } };

                //Act
                target.SetMerchantInfoOnTransactionModel(transactionModel, booking, business, businessChannel, settlementPayments);

                //Assert
                Assert.AreEqual(transactionModel.MerchantId, string.Empty);
            }