public void TestAddSubmerchantCredit() { var submerchantCredit = new submerchantCredit(); submerchantCredit.fundingSubmerchantId = "123456"; submerchantCredit.submerchantName = "merchant"; submerchantCredit.fundsTransferId = "123467"; submerchantCredit.amount = 106L; var echeck = new echeckType(); echeck.accType = echeckAccountTypeEnum.Checking; echeck.accNum = "12345657890"; echeck.routingNum = "123456789"; echeck.checkNum = "123455"; submerchantCredit.accountInfo = echeck; submerchantCredit.customIdentifier = "abc123"; batchRequest.addSubmerchantCredit(submerchantCredit); Assert.AreEqual(1, batchRequest.getNumSubmerchantCredit()); Assert.AreEqual(106L, batchRequest.getSubmerchantCreditAmount()); Assert.AreEqual("\r\n<submerchantCredit reportGroup=\"Default Report Group\">\r\n<fundingSubmerchantId>123456</fundingSubmerchantId>\r\n<submerchantName>merchant</submerchantName>\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<customIdentifier>abc123</customIdentifier>\r\n</submerchantCredit>", submerchantCredit.Serialize()); mockCnpFile.Verify(cnpFile => cnpFile.createRandomFile(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), mockCnpTime.Object)); mockCnpFile.Verify(cnpFile => cnpFile.AppendLineToFile(mockFilePath, submerchantCredit.Serialize())); }
public void testAddSubmerchantCredit() { var submerchantCredit = new submerchantCredit(); submerchantCredit.fundingSubmerchantId = "123456"; submerchantCredit.submerchantName = "merchant"; submerchantCredit.fundsTransferId = "123467"; submerchantCredit.amount = 106L; var echeck = new echeckType(); echeck.accType = echeckAccountTypeEnum.Checking; echeck.accNum = "12345657890"; echeck.routingNum = "123456789"; echeck.checkNum = "123455"; submerchantCredit.accountInfo = echeck; batchRequest.addSubmerchantCredit(submerchantCredit); Assert.AreEqual(1, batchRequest.getNumSubmerchantCredit()); Assert.AreEqual(106L, batchRequest.getSubmerchantCreditAmount()); mockLitleFile.Verify( litleFile => litleFile.createRandomFile(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), mockLitleTime.Object)); mockLitleFile.Verify(litleFile => litleFile.AppendLineToFile(mockFilePath, submerchantCredit.Serialize())); }
public void testAddSubmerchantCredit() { var submerchantCredit = new submerchantCredit(); submerchantCredit.fundingSubmerchantId = "123456"; submerchantCredit.submerchantName = "merchant"; submerchantCredit.fundsTransferId = "123467"; submerchantCredit.amount = 106L; var echeck = new echeckType(); echeck.accType = echeckAccountTypeEnum.Checking; echeck.accNum = "12345657890"; echeck.routingNum = "123456789"; echeck.checkNum = "123455"; submerchantCredit.accountInfo = echeck; batchRequest.addSubmerchantCredit(submerchantCredit); Assert.AreEqual(1, batchRequest.getNumSubmerchantCredit()); Assert.AreEqual(106L, batchRequest.getSubmerchantCreditAmount()); mockLitleFile.Verify( litleFile => litleFile.createRandomFile(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<string>(), mockLitleTime.Object)); mockLitleFile.Verify(litleFile => litleFile.AppendLineToFile(mockFilePath, submerchantCredit.Serialize())); }