The next step tests to ensure the new logic is
functioning well. To test the new logic, you should be able to successfully
add five unique items to the shopping cart, but expect an error to
be thrown when you attempt to add a sixth unique item to the cart.
Procedure
- In the Servers view, restart the WC Project:
- Expand WebSphere Commerce Test Server,
right-click WC; then click Restart
Project.
- Wait until the project restarts successfully.
- Navigate to the directory.
- Select the index.jsp file and from
its pop-up menu select . The store home
page displays in the Web browser.
- Shop through the store and add five items to the shopping
cart. After adding the fifth item, your shopping cart status will
be similar to the following screen capture:
- Try to add another item to your shopping cart. A page displays
containing the text: Return to the previous screen and
the error message:
You cannot add more items into your shopping
cart. Your shopping cart can hold up to five different items.
displays
in the Rational Application Developer Console view. - Click the Return to the previous screen button
to be redirected back to the product display page.