Package com.yummynoodlebar.core.events.orders

Examples of com.yummynoodlebar.core.events.orders.OrderDetails


  public boolean canBeDeleted() {
    return true;
  }

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

    BeanUtils.copyProperties(this, details);

    return details;
  }
View Full Code Here


  @Test
  public void thatOrderCanConvertToOrderDetails() {
    Order order = RestDataFixture.standardOrder();

    OrderDetails details = order.toOrderDetails();

    assertEquals(order.getKey(), details.getKey());
    assertEquals(order.getDateTimeOfSubmission(), details.getDateTimeOfSubmission());
    assertEquals(details.getOrderItems().size(), details.getOrderItems().size());
    assertTrue(details.getOrderItems().containsKey(RestDataFixture.YUMMY_ITEM));
    assertEquals(details.getOrderItems().get(RestDataFixture.YUMMY_ITEM), order.getItems().get(RestDataFixture.YUMMY_ITEM));
  }
View Full Code Here

    assertEquals(details.getOrderItems().get(RestDataFixture.YUMMY_ITEM), order.getItems().get(RestDataFixture.YUMMY_ITEM));
  }

  @Test
  public void thatOrderCanConvertFromOrderDetails() {
    OrderDetails details = RestDataFixture.standardOrderDetails();

    Order order = Order.fromOrderDetails(details);

    assertEquals(order.getKey(), details.getKey());
    assertEquals(order.getDateTimeOfSubmission(), details.getDateTimeOfSubmission());
    assertEquals(order.getItems().size(), details.getOrderItems().size());
    assertTrue(order.getItems().containsKey(RestDataFixture.YUMMY_ITEM));
    assertEquals(details.getOrderItems().get(RestDataFixture.YUMMY_ITEM), order.getItems().get(RestDataFixture.YUMMY_ITEM));
  }
View Full Code Here

  public void setKey(UUID key) {
    this.key = key;
  }

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

    details.setOrderItems(items);
    details.setKey(key);
    details.setDateTimeOfSubmission(dateTimeOfSubmission);

    return details;
  }
View Full Code Here

  public void setKey(UUID key) {
    this.key = key;
  }

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

    details.setOrderItems(items);
    details.setKey(key);
    details.setDateTimeOfSubmission(dateTimeOfSubmission);

    return details;
  }
View Full Code Here

  @Test
  public void thatOrderCanConvertToOrderDetails() {
    Order order = RestDataFixture.standardOrder();

    OrderDetails details = order.toOrderDetails();

    assertEquals(order.getKey(), details.getKey());
    assertEquals(order.getDateTimeOfSubmission(), details.getDateTimeOfSubmission());
    assertEquals(details.getOrderItems().size(), details.getOrderItems().size());
    assertTrue(details.getOrderItems().containsKey(RestDataFixture.YUMMY_ITEM));
    assertEquals(details.getOrderItems().get(RestDataFixture.YUMMY_ITEM), order.getItems().get(RestDataFixture.YUMMY_ITEM));
  }
View Full Code Here

    assertEquals(details.getOrderItems().get(RestDataFixture.YUMMY_ITEM), order.getItems().get(RestDataFixture.YUMMY_ITEM));
  }

  @Test
  public void thatOrderCanConvertFromOrderDetails() {
    OrderDetails details = RestDataFixture.standardOrderDetails();

    Order order = Order.fromOrderDetails(details);

    assertEquals(order.getKey(), details.getKey());
    assertEquals(order.getDateTimeOfSubmission(), details.getDateTimeOfSubmission());
    assertEquals(order.getItems().size(), details.getOrderItems().size());
    assertTrue(order.getItems().containsKey(RestDataFixture.YUMMY_ITEM));
    assertEquals(details.getOrderItems().get(RestDataFixture.YUMMY_ITEM), order.getItems().get(RestDataFixture.YUMMY_ITEM));
  }
View Full Code Here

  OrderService orderService;

  @Test
  public void addANewOrderToTheSystem() {

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

    orderService.createOrder(ev);

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

  @Test
  public void thatOrderCanConvertToOrderDetails() {
    Order order = RestDataFixture.standardOrder();

    OrderDetails details = order.toOrderDetails();

    assertEquals(order.getKey(), details.getKey());
    assertEquals(order.getDateTimeOfSubmission(), details.getDateTimeOfSubmission());
    assertEquals(details.getOrderItems().size(), details.getOrderItems().size());
    assertTrue(details.getOrderItems().containsKey(RestDataFixture.YUMMY_ITEM));
    assertEquals(details.getOrderItems().get(RestDataFixture.YUMMY_ITEM), order.getItems().get(RestDataFixture.YUMMY_ITEM));
  }
View Full Code Here

    assertEquals(details.getOrderItems().get(RestDataFixture.YUMMY_ITEM), order.getItems().get(RestDataFixture.YUMMY_ITEM));
  }

  @Test
  public void thatOrderCanConvertFromOrderDetails() {
    OrderDetails details = RestDataFixture.standardOrderDetails();

    Order order = Order.fromOrderDetails(details);

    assertEquals(order.getKey(), details.getKey());
    assertEquals(order.getDateTimeOfSubmission(), details.getDateTimeOfSubmission());
    assertEquals(order.getItems().size(), details.getOrderItems().size());
    assertTrue(order.getItems().containsKey(RestDataFixture.YUMMY_ITEM));
    assertEquals(details.getOrderItems().get(RestDataFixture.YUMMY_ITEM), order.getItems().get(RestDataFixture.YUMMY_ITEM));
  }
View Full Code Here

TOP

Related Classes of com.yummynoodlebar.core.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.