private static void ProcessOrder(IOrderApi client, int i) { var order = new Order { Count = i, OrderDate = DateTime.Now, OrderId = Guid.NewGuid(), UnitPrice = 12.23m, UserName = "******" }; client.Add(order.OrderId, order); var orderFromDb = client.Get(order.OrderId); Debug.Assert(orderFromDb.Equals(order)); var removed = client.Remove(order.OrderId); Debug.Assert(removed); var removedOrder = client.Get(order.OrderId); removedOrder.UserName = ""; Debug.Assert(removedOrder.Equals(new Order { UserName = "" })); Log.WriteLine("Order {0}", i); }
private static void ProcessOrder(IOrderApi client, int i) { var order = new Order { Count = i, OrderDate = DateTime.Now, OrderId = Guid.NewGuid(), UnitPrice = 12.23m, UserName = "******" }; client.Add(order.OrderId, order); var orderFromDb = client.Get(order.OrderId); Debug.Assert(orderFromDb.Equals(order)); var removed = client.Remove(order.OrderId); Debug.Assert(removed); var removedOrder = client.Get(order.OrderId); removedOrder.UserName = ""; Debug.Assert(removedOrder.Equals(new Order {UserName = ""})); Log.WriteLine("Order {0}", i); }