コード例 #1
0
  private PlanningState createPlanningStateFor(final Order newOrder) {
    return adHocTransaction.runOnAnotherReadOnlyTransaction(
        new IOnTransaction<PlanningState>() {

          @Override
          public PlanningState execute() {
            return planningStateCreator.createOn(mockDesktop(), newOrder);
          }
        });
  }
コード例 #2
0
 private Order givenOrderFromPrepareForCreate() {
   adHocTransaction.runOnAnotherReadOnlyTransaction(
       new IOnTransaction<Void>() {
         @Override
         public Void execute() {
           orderModel.prepareForCreate(mockDesktop());
           return null;
         }
       });
   Order order = orderModel.getOrder();
   order.setName("name");
   order.setCode("code");
   order.setInitDate(new Date());
   order.setCustomer(createValidExternalCompany());
   return order;
 }