public StoreOrderResponse StoreOrder(StoreOrderRequest request) { StoreOrderResponse response = new StoreOrderResponse(); OrderBusinessComponent bc = DependencyInjectionHelper.GetOrderBusinessComponent(); Order order = OrderAdapter.DtoToOrder(request.Order); IEnumerable<ChangeItem> changeItems = OrderAdapter.GetChangeItems(request.Order, order); response.Id = bc.StoreOrder(order, changeItems); return response; }
public void TestStoreOrder() { OrderDTO order = new OrderDTO(); order.Id = 123; StoreOrderResponse response = new StoreOrderResponse(); response.Id = order.Id; Expect.Once.On(service).Method("StoreOrder").Will(Return.Value(response)); serviceFacade.StoreOrder(order); }