Author: ropalka
Date: 2012-05-11 08:29:03 -0400 (Fri, 11 May 2012)
New Revision: 16272
Modified:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.java
Log:
[JBPAPP-8417] fixing wrong test - precondition that methods are executed in the same order
as they're declared in source file is wrong - neither Java nor JUnit don't
guarantee that
Modified:
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.java
===================================================================
---
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.java 2012-05-11
11:48:39 UTC (rev 16271)
+++
shared-testsuite/trunk/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.java 2012-05-11
12:29:03 UTC (rev 16272)
@@ -72,17 +72,24 @@
port2 = new AddressingPort(service2.getPort(StatefulEndpoint.class, new
AddressingFeature(true, true)));
}
}
-
- public void testAddItem() throws Exception
+
+ public void testItemLifecycle() throws Exception
{
+ firstAddItem();
+ secondGetItems();
+ thirdCheckout();
+ }
+
+ private void firstAddItem() throws Exception
+ {
port1.addItem("Ice Cream");
port1.addItem("Ferrari");
-
+
port2.addItem("Mars Bar");
port2.addItem("Porsche");
}
- public void testGetItems() throws Exception
+ private void secondGetItems() throws Exception
{
String items1 = port1.getItems();
assertEquals("[Ice Cream, Ferrari]", items1);
@@ -91,7 +98,7 @@
assertEquals("[Mars Bar, Porsche]", items2);
}
- public void testCheckout() throws Exception
+ private void thirdCheckout() throws Exception
{
port1.checkout();
assertEquals("[]", port1.getItems());
Show replies by date