assertTrue(apiContext.getOutput().contains("itemDescription"));
assertTrue(apiContext.getOutput().contains("<unit-price currency=\"XXX\">10</unit-price>"));
}
public void testCartPosterMultipleBuilds() {
CheckoutShoppingCartBuilder builder =
apiContext().cartPoster()
.makeCart()
.addItem("itemName", "itemDescription", BigDecimal.valueOf(10.0), 1);
builder.build();
try {
builder.build();
fail();
} catch (IllegalStateException expected) {
// pass
}
}