Author: ropalka
Date: 2012-05-11 08:34:23 -0400 (Fri, 11 May 2012)
New Revision: 16273
Modified:
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/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 = svn merge -r16271:16272
https://svn.jboss.org/repos/jbossws/shared-testsuite/trunk
Property changes on: shared-testsuite/branches/jbossws-shared-testsuite-4.0.x
___________________________________________________________________
Modified: svn:mergeinfo
- /shared-testsuite/branches/asoldano:14040-14045
/shared-testsuite/trunk:15976,16022,16066,16068
+ /shared-testsuite/branches/asoldano:14040-14045
/shared-testsuite/trunk:15976,16022,16066,16068,16272
Modified:
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.java
===================================================================
---
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.java 2012-05-11
12:29:03 UTC (rev 16272)
+++
shared-testsuite/branches/jbossws-shared-testsuite-4.0.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/samples/addressing/AddressingStatefulTestCase.java 2012-05-11
12:34:23 UTC (rev 16273)
@@ -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());