示例#1
0
        public void TestAddVendorDebit()
        {
            var vendorDebit = new vendorDebit();

            vendorDebit.fundingSubmerchantId = "123456";
            vendorDebit.vendorName           = "merchant";
            vendorDebit.fundsTransferId      = "123467";
            vendorDebit.amount = 106L;
            var echeck = new echeckType();

            echeck.accType          = echeckAccountTypeEnum.Checking;
            echeck.accNum           = "12345657890";
            echeck.routingNum       = "123456789";
            echeck.checkNum         = "123455";
            vendorDebit.accountInfo = echeck;

            batchRequest.addVendorDebit(vendorDebit);

            Assert.AreEqual(1, batchRequest.getNumVendorDebit());
            Assert.AreEqual(106L, batchRequest.getVendorDebitAmount());
            Assert.AreEqual("\r\n<vendorDebit reportGroup=\"Default Report Group\">\r\n<fundingSubmerchantId>123456</fundingSubmerchantId>\r\n<vendorName>merchant</vendorName>\r\n<fundsTransferId>123467</fundsTransferId>\r\n<amount>106</amount>\r\n<accountInfo>\r\n<accType>Checking</accType>\r\n<accNum>12345657890</accNum>\r\n<routingNum>123456789</routingNum>\r\n<checkNum>123455</checkNum></accountInfo>\r\n</vendorDebit>",
                            vendorDebit.Serialize());

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

            vendorDebit.fundingSubmerchantId = "123456";
            vendorDebit.vendorName           = "merchant";
            vendorDebit.fundsTransferId      = "123467";
            vendorDebit.amount = 106L;
            var echeck = new echeckType();

            echeck.accType          = echeckAccountTypeEnum.Checking;
            echeck.accNum           = "12345657890";
            echeck.routingNum       = "123456789";
            echeck.checkNum         = "123455";
            vendorDebit.accountInfo = echeck;

            batchRequest.addVendorDebit(vendorDebit);

            Assert.AreEqual(1, batchRequest.getNumVendorDebit());
            Assert.AreEqual(106L, batchRequest.getVendorDebitAmount());

            mockLitleFile.Verify(
                litleFile =>
                litleFile.createRandomFile(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(),
                                           mockLitleTime.Object));
            mockLitleFile.Verify(litleFile => litleFile.AppendLineToFile(mockFilePath, vendorDebit.Serialize()));
        }
        public void testAddVendorDebit()
        {
            var vendorDebit = new vendorDebit();
            vendorDebit.fundingSubmerchantId = "123456";
            vendorDebit.vendorName = "merchant";
            vendorDebit.fundsTransferId = "123467";
            vendorDebit.amount = 106L;
            var echeck = new echeckType();
            echeck.accType = echeckAccountTypeEnum.Checking;
            echeck.accNum = "12345657890";
            echeck.routingNum = "123456789";
            echeck.checkNum = "123455";
            vendorDebit.accountInfo = echeck;

            batchRequest.addVendorDebit(vendorDebit);

            Assert.AreEqual(1, batchRequest.getNumVendorDebit());
            Assert.AreEqual(106L, batchRequest.getVendorDebitAmount());

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