public void TestAddCustomerDebit() { var customerDebit = new customerDebit(); customerDebit.fundingCustomerId = "123456"; customerDebit.customerName = "John Doe"; customerDebit.fundsTransferId = "123467"; customerDebit.amount = 107L; customerDebit.customIdentifier = "12345678"; var echeck = new echeckType(); echeck.accType = echeckAccountTypeEnum.Checking; echeck.accNum = "12345657890"; echeck.routingNum = "123456789"; echeck.checkNum = "123455"; customerDebit.accountInfo = echeck; batchRequest.addCustomerDebit(customerDebit); Assert.AreEqual(1, batchRequest.getNumCustomerDebit()); Assert.AreEqual(107L, batchRequest.getCustomerDebitAmount()); Assert.AreEqual("\r\n<customerDebit reportGroup=\"Default Report Group\">\r\n<fundingCustomerId>123456</fundingCustomerId>\r\n<customerName>John Doe</customerName>\r\n<fundsTransferId>123467</fundsTransferId>\r\n<amount>107</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>12345678</customIdentifier>\r\n</customerDebit>", customerDebit.Serialize()); mockCnpFile.Verify(cnpFile => cnpFile.createRandomFile(It.IsAny <string>(), It.IsAny <string>(), It.IsAny <string>(), mockCnpTime.Object)); mockCnpFile.Verify(cnpFile => cnpFile.AppendLineToFile(mockFilePath, customerDebit.Serialize())); }