Package com.yummynoodlebar.events.orders

Examples of com.yummynoodlebar.events.orders.OrderDetails


  }

  @Test
  public void addANewOrderToTheSystem() {

    CreateOrderEvent ev = new CreateOrderEvent(new OrderDetails());

    orderService.createOrder(ev);

    AllOrdersEvent allOrders = orderService.requestAllOrders(new RequestAllOrdersEvent());
View Full Code Here


  public void clear() {
    items = new HashMap<String, MenuItem>();
  }
 
  public OrderDetails createOrderDetailsWithCustomerInfo(CustomerInfo info) {
      OrderDetails order = new OrderDetails();
      BeanUtils.copyProperties(info, order);
      order.setDateTimeOfSubmission(new Date());
      copyItemsFromBasketToOrder(order);
    return order;
  }
View Full Code Here

  public static final BigDecimal COST = new BigDecimal("10.99");
  public static final int MINUTES_TO_PREPARE = 5;
  public static final String STATUS_RECEIVED = "RECEIVED";

  public static OrderCreatedEvent newOrder(UUID id) {
    return new OrderCreatedEvent(id, new OrderDetails());
  }
View Full Code Here

  public static OrderDetails standardOrderDetails () {
    return standardOrderDetails(UUID.randomUUID());
}
 
  public static OrderDetails standardOrderDetails (UUID id) {
    OrderDetails orderDetails = new OrderDetails(id);
    orderDetails.setName(CUSTOMER_NAME);
    return orderDetails;
}
View Full Code Here

    }

    LOG.debug("No errors, continue with processing for Customer {}:",
        customer.getName());

    OrderDetails order = basket
        .createOrderDetailsWithCustomerInfo(customer);

    OrderCreatedEvent event = orderService
        .createOrder(new CreateOrderEvent(order));
View Full Code Here

    this.menuItems = menuItems;
    return this;
  }

  public OrderDetails toOrderDetails() {
    OrderDetails details = new OrderDetails();

    details.setDateTimeOfSubmission(getDateTimeOfSubmission());
    details.setKey(getKey());

    return details;
  }
View Full Code Here

  public Map<String, Integer> getOrderItems() {
    return orderItems;
  }

  public OrderDetails toOrderDetails() {
    OrderDetails details = new OrderDetails();

    BeanUtils.copyProperties(this, details);

    return details;
  }
View Full Code Here

TOP

Related Classes of com.yummynoodlebar.events.orders.OrderDetails

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.