Class AmazonOrdersTestkit

java.lang.Object
com.amazon.orders.testkit.AmazonOrdersTestkit

public class AmazonOrdersTestkit extends Object
  • Constructor Details

    • AmazonOrdersTestkit

      public AmazonOrdersTestkit(String url, int port)
  • Method Details

    • runServer

      public void runServer()
      Starting the testkit.
    • listOrderedProductsIds

      public ArrayList<String> listOrderedProductsIds()
      Returns all the item ids that ordered
      Returns:
      The ordered items ids
    • givenOrders

      public void givenOrders(String[] itemIds, String orderId)
      Given item ids, the testkit will return the given orderId
      Parameters:
      itemIds - The items you want to order
      orderId - The order id to be returned
    • throwsExceptionOn

      public void throwsExceptionOn(String[] itemIds)
      Given item ids, the testkit will fail to create an order
      Parameters:
      itemIds - The items you want to order