@Test public void shouldCalculateTotal() { assertEquals(CHICKEN_VINDALOO_PRICE.multiply(CHICKEN_VINDALOO_QUANTITY), order.getOrderTotal()); }
public Money getOrderTotal() { return orderLineItems.orderTotal(); }
Order { public Money getOrderTotal() { return orderLineItems.orderTotal(); } }
Order { public Money getOrderTotal() { return orderLineItems.orderTotal(); } private  Order();  Order(long consumerId, long restaurantId, DeliveryInformation deliveryInformation, List<OrderLineItem> orderLineItems); }
Order { public Money getOrderTotal() { return orderLineItems.orderTotal(); } private  Order();  Order(long consumerId, long restaurantId, DeliveryInformation deliveryInformation, List<OrderLineItem> orderLineItems); static ResultWithDomainEvents<Order, OrderDomainEvent> createOrder(long consumerId, Restaurant restaurant, DeliveryInformation deliveryInformation, List<OrderLineItem> orderLineItems); Long getId(); void setId(Long id); DeliveryInformation getDeliveryInformation(); Money getOrderTotal(); List<OrderDomainEvent> cancel(); List<OrderDomainEvent> undoPendingCancel(); List<OrderDomainEvent> noteCancelled(); List<OrderDomainEvent> noteApproved(); List<OrderDomainEvent> noteRejected(); List<OrderDomainEvent> noteReversingAuthorization(); ResultWithDomainEvents<LineItemQuantityChange, OrderDomainEvent> revise(OrderRevision orderRevision); List<OrderDomainEvent> rejectRevision(); List<OrderDomainEvent> confirmRevision(OrderRevision orderRevision); Long getVersion(); List<OrderLineItem> getLineItems(); OrderState getState(); long getRestaurantId(); Long getConsumerId(); }
Order { public Money getOrderTotal() { return orderLineItems.orderTotal(); } private  Order();  Order(long consumerId, long restaurantId, DeliveryInformation deliveryInformation, List<OrderLineItem> orderLineItems); static ResultWithDomainEvents<Order, OrderDomainEvent> createOrder(long consumerId, Restaurant restaurant, DeliveryInformation deliveryInformation, List<OrderLineItem> orderLineItems); Long getId(); void setId(Long id); DeliveryInformation getDeliveryInformation(); Money getOrderTotal(); List<OrderDomainEvent> cancel(); List<OrderDomainEvent> undoPendingCancel(); List<OrderDomainEvent> noteCancelled(); List<OrderDomainEvent> noteApproved(); List<OrderDomainEvent> noteRejected(); List<OrderDomainEvent> noteReversingAuthorization(); ResultWithDomainEvents<LineItemQuantityChange, OrderDomainEvent> revise(OrderRevision orderRevision); List<OrderDomainEvent> rejectRevision(); List<OrderDomainEvent> confirmRevision(OrderRevision orderRevision); Long getVersion(); List<OrderLineItem> getLineItems(); OrderState getState(); long getRestaurantId(); Long getConsumerId();  }