public class OrderServiceSample extends Object
User: Kirill, Date: 11.09.13 16:21
.Modifier and Type | Class and Description |
---|---|
static interface |
OrderServiceSample.Stopper
This class decides when you stop getting the order.
|
Modifier and Type | Field and Description |
---|---|
static DiagnosticsUtil.Indexer<String,OrderItemInfo> |
ORDER_ITEM_INFO_BY_PRODUCT_INDEXER |
private OrderService |
orderService |
private SellerService |
sellerService |
Constructor and Description |
---|
OrderServiceSample(URL url,
Credentials credentials,
Transport transport) |
Modifier and Type | Method and Description |
---|---|
private static void |
assertCustmozation(Map<String,OrderItemInfo> orderItemsByProductName,
String product1,
String expectedCustomization) |
private static void |
assertDelta(Map<String,OrderItemInfo> orderItemsByProductIdentifier,
String productID,
int delata) |
private static void |
containsProduct(Map<String,OrderItemInfo> orderItemsByProductIdentifier,
String productId) |
OrderInfo |
createOrder(String treasurer,
List<OrderItemInfo> items) |
OrderItemInfo |
createOrderItem(String productIdentifier,
int delta) |
OrderItemInfo |
createOrderItem(String productIdentifier,
String customization,
int delta) |
private static void |
createSaleByOrder(OrderInfo orderInfo) |
void |
testGetOrder() |
private void |
testGetOrder(OrderServiceSample.Stopper stopper) |
void |
testSendOrder() |
private final SellerService sellerService
private final OrderService orderService
public static final DiagnosticsUtil.Indexer<String,OrderItemInfo> ORDER_ITEM_INFO_BY_PRODUCT_INDEXER
public OrderServiceSample(URL url, Credentials credentials, Transport transport)
public void testSendOrder()
public void testGetOrder() throws InterruptedException
InterruptedException
private void testGetOrder(OrderServiceSample.Stopper stopper) throws InterruptedException
InterruptedException
private static void assertCustmozation(Map<String,OrderItemInfo> orderItemsByProductName, String product1, String expectedCustomization)
private static void createSaleByOrder(OrderInfo orderInfo)
private static void assertDelta(Map<String,OrderItemInfo> orderItemsByProductIdentifier, String productID, int delata)
private static void containsProduct(Map<String,OrderItemInfo> orderItemsByProductIdentifier, String productId)
public OrderItemInfo createOrderItem(String productIdentifier, int delta)
public OrderItemInfo createOrderItem(String productIdentifier, String customization, int delta)
public OrderInfo createOrder(String treasurer, List<OrderItemInfo> items)
Copyright © 2015. All rights reserved.