コード例 #1
0
ファイル: AdminService.cs プロジェクト: ikelos555/HSROrderApp
        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;
        }
コード例 #2
0
 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);
 }