Пример #1
0
        public void TestAddPayFacDebit()
        {
            var payFacDebit = new payFacDebit();

            payFacDebit.fundingSubmerchantId = "123456";
            payFacDebit.fundsTransferId      = "123467";
            payFacDebit.amount = 107L;

            batchRequest.addPayFacDebit(payFacDebit);

            Assert.AreEqual(1, batchRequest.getNumPayFacDebit());
            Assert.AreEqual(107L, batchRequest.getPayFacDebitAmount());
            Assert.AreEqual("\r\n<payFacDebit reportGroup=\"Default Report Group\">\r\n<fundingSubmerchantId>123456</fundingSubmerchantId>\r\n<fundsTransferId>123467</fundsTransferId>\r\n<amount>107</amount>\r\n</payFacDebit>",
                            payFacDebit.Serialize());

            mockCnpFile.Verify(cnpFile => cnpFile.createRandomFile(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), mockCnpTime.Object));
            mockCnpFile.Verify(cnpFile => cnpFile.AppendLineToFile(mockFilePath, payFacDebit.Serialize()));
        }
        public void testAddPayFacDebit()
        {
            var payFacDebit = new payFacDebit();

            payFacDebit.fundingSubmerchantId = "123456";
            payFacDebit.fundsTransferId      = "123467";
            payFacDebit.amount = 107L;

            batchRequest.addPayFacDebit(payFacDebit);

            Assert.AreEqual(1, batchRequest.getNumPayFacDebit());
            Assert.AreEqual(107L, batchRequest.getPayFacDebitAmount());

            mockLitleFile.Verify(
                litleFile =>
                litleFile.createRandomFile(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(),
                                           mockLitleTime.Object));
            mockLitleFile.Verify(litleFile => litleFile.AppendLineToFile(mockFilePath, payFacDebit.Serialize()));
        }
        public void testAddPayFacDebit()
        {
            var payFacDebit = new payFacDebit();
            payFacDebit.fundingSubmerchantId = "123456";
            payFacDebit.fundsTransferId = "123467";
            payFacDebit.amount = 107L;

            batchRequest.addPayFacDebit(payFacDebit);

            Assert.AreEqual(1, batchRequest.getNumPayFacDebit());
            Assert.AreEqual(107L, batchRequest.getPayFacDebitAmount());

            mockLitleFile.Verify(
                litleFile =>
                    litleFile.createRandomFile(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(),
                        mockLitleTime.Object));
            mockLitleFile.Verify(litleFile => litleFile.AppendLineToFile(mockFilePath, payFacDebit.Serialize()));
        }