public void ShouldGetUpdatedOrders() { var store = new AmazonStore(); var results = store.GetUpdatedAmazonOrdersViaFecther(); results.Count.ShouldBeGreaterThan(1); }
public void GetSpecificOrderAndMapToAx() { var store = new AmazonStore(); var amazonId = "102-2130201-6848236"; dynamic table = new AmazonOrders(); var rec = table.First(OrderNumber:amazonId); var salesOrder= store.MapFromAmazonCache(rec); store.GetOrderItems(salesOrder); }
public void GetUnprocessedOrders() { var store = new AmazonStore(); var results = store.GetUnprocessedOrders(); results.Count.ShouldBeGreaterThan(1); var twoLines = results.Where(x => x.OrderId == "103-1460378-9201802"); twoLines.Count().ShouldBe(1); twoLines.First().LineItems.Count.ShouldBe(2); }
public void ShouldGetNewOrders() { var store = new AmazonStore(); var results = store.GetNewOrders(); results.Count.ShouldBeGreaterThan(1); results.ForEach(x => Console.WriteLine(x.OrderId)); var orderService = new OrderService(); //results.ForEach(x => orderService.CreateAmazonOrder(x)); }
public void ProcessAmazonOrders() { var store = new AmazonStore(); var newOrders = store.GetNewOrders(); // also need to update exiting pendings ...!!! NLog.LogManager.GetCurrentClassLogger().Info("New amazon orders: {0}", newOrders.Count); newOrders.ForEach(x => CreateAmazonOrder(x)); var unprocessedOrders = store.GetUnprocessedOrders(); unprocessedOrders.ForEach(x => CreateAxSalesOrder(x, "Amazon")); }