public void testLoad_OnlyRequired() { load load = new load(); load.orderId = "12345"; load.amount = 200; load.orderSource = orderSourceType.ecommerce; load.card = new cardType(); load.id = "theId"; load.reportGroup = "theReportGroup"; String actual = load.Serialize(); String expected = @" <load id=""theId"" reportGroup=""theReportGroup""> <orderId>12345</orderId> <amount>200</amount> <orderSource>ecommerce</orderSource> <card> <type>MC</type> </card> </load>"; Assert.AreEqual(expected, actual); }
public void testLoad() { load load = new load(); load.amount = 600; load.orderSource = orderSourceType.ecommerce; load.card = new cardType(); batchRequest.addLoad(load); Assert.AreEqual(1, batchRequest.getNumLoads()); Assert.AreEqual(600, batchRequest.getLoadAmount()); mockLitleFile.Verify(litleFile => litleFile.createRandomFile(It.IsAny<String>(), It.IsAny<String>(), It.IsAny<String>(), mockLitleTime.Object)); mockLitleFile.Verify(litleFile => litleFile.AppendLineToFile(mockFilePath, load.Serialize())); }