cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r516103 [10/11] - in /incubator/cxf/trunk: ./ common/common/src/test/java/org/apache/cxf/common/annotation/ common/common/src/test/java/org/apache/cxf/common/classloader/ common/common/src/test/java/org/apache/cxf/common/commands/ common/co...
Date Thu, 08 Mar 2007 17:15:05 GMT
Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient2.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient2.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient2.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient2.java Thu Mar  8 09:14:44 2007
@@ -79,13 +79,10 @@
 import org.apache.type_test.types3.StructWithSubstitutionGroup;
 import org.apache.type_test.types3.StructWithSubstitutionGroupAbstract;
 import org.apache.type_test.types3.StructWithSubstitutionGroupNil;
+import org.junit.Test;
 
 public abstract class AbstractTypeTestClient2 extends AbstractTypeTestClient {
 
-    public AbstractTypeTestClient2(String name) {
-        super(name);
-    }
-
     protected <T> boolean equalsNilable(T x, T y) {
         if (x == null) {
             return y == null;
@@ -101,7 +98,7 @@
     }
 
     //org.apache.type_test.types1.EmptyStruct
-    
+    @Test
     public void testEmptyStruct() throws Exception {
         EmptyStruct x = new EmptyStruct();
         EmptyStruct yOrig = new EmptyStruct();
@@ -159,7 +156,7 @@
             && (x.getVarString().equals(y.getVarString()))
             && (equalsNilable(x.getVarAttrString(), y.getVarAttrString()));
     }
-    
+    @Test
     public void testSimpleStruct() throws Exception {
         SimpleStruct x = new SimpleStruct();
         x.setVarFloat(3.14f);
@@ -198,7 +195,7 @@
             && equalsNilable(x.getVarString(), y.getVarString())
             && equalsNilable(x.getVarStruct(), y.getVarStruct());
     }
-    
+    @Test
     public void testStructWithNillables() throws Exception {
         StructWithNillables x = new StructWithNillables();
         StructWithNillables yOrig = new StructWithNillables();
@@ -232,7 +229,7 @@
             && (x.getVarInt() == y.getVarInt())
             && (x.getVarString().equals(y.getVarString()));
     }
-    
+    @Test
     public void testAnonymousStruct() throws Exception {
         AnonymousStruct x = new AnonymousStruct();
         x.setVarInt(100);
@@ -289,7 +286,7 @@
             return equals(x, y);
         }
     }
-    
+    @Test
     public void testNestedStruct() throws Exception {
         SimpleStruct xs = new SimpleStruct();
         xs.setVarFloat(30.14);
@@ -334,7 +331,7 @@
     }
     
     //org.apache.type_test.types1.FixedArray
-    
+    @Test
     public void testFixedArray() throws Exception {
         FixedArray x = new FixedArray();
         x.getItem().addAll(Arrays.asList(Integer.MIN_VALUE, 0, Integer.MAX_VALUE));
@@ -365,7 +362,7 @@
     }
     
     //org.apache.type_test.types1.BoundedArray
-    
+    @Test
     public void testBoundedArray() throws Exception {
         BoundedArray x = new BoundedArray();
         x.getItem().addAll(Arrays.asList(-100.00f, 0f, 100.00f));
@@ -417,7 +414,7 @@
         }
         return true;
     }
-    
+    @Test
     public void testUnboundedArray() throws Exception {
         UnboundedArray x = new UnboundedArray();
         x.getItem().addAll(Arrays.asList("AAA", "BBB", "CCC"));
@@ -449,7 +446,7 @@
         return x.getArray1().equals(y.getArray1())
             && x.getArray2().equals(y.getArray2());
     }
-    
+    @Test
     public void testCompoundArray() throws Exception {
         CompoundArray x = new CompoundArray();
         x.getArray1().addAll(Arrays.asList("AAA", "BBB", "CCC"));
@@ -479,7 +476,7 @@
     }
 
     //org.apache.type_test.types1.NestedArray
-    
+    @Test
     public void testNestedArray() throws Exception {
         String[][] xs = {{"AAA", "BBB", "CCC"}, {"aaa", "bbb", "ccc"}, {"a_a_a", "b_b_b", "c_c_c"}};
         String[][] ys = {{"XXX", "YYY", "ZZZ"}, {"xxx", "yyy", "zzz"}, {"x_x_x", "y_y_y", "z_z_z"}};
@@ -549,7 +546,7 @@
             }
         }
     }
-
+    @Test
     public void testStructWithList() throws Exception {
         StructWithList x = new StructWithList();
         x.getVarList().add("I");
@@ -620,7 +617,7 @@
         assertEquals(msg, x.getVarUnion(), y.getVarUnion());
         assertEquals(msg, x.getAttribUnion(), y.getAttribUnion());
     }
-
+    @Test
     public void testStructWithUnion() throws Exception {
         StructWithUnion x = new StructWithUnion();
         x.setVarUnion("999");
@@ -675,7 +672,7 @@
     }
     
     //org.apache.type_test.types1.EmptyChoice
-
+    @Test
     public void testEmptyChoice() throws Exception {
         EmptyChoice x = new EmptyChoice();
         EmptyChoice yOrig = new EmptyChoice();
@@ -711,7 +708,7 @@
             return false;
         }
     }
-
+    @Test
     public void testSimpleChoice() throws Exception {
         SimpleChoice x = new SimpleChoice();
         x.setVarFloat(-3.14f);
@@ -739,7 +736,7 @@
     }
     
     //org.apache.type_test.types1.EmptyAll
-
+    @Test
     public void testEmptyAll() throws Exception {
         EmptyAll x = new EmptyAll();
         EmptyAll yOrig = new EmptyAll();
@@ -770,7 +767,7 @@
             && (x.getVarString().equals(y.getVarString()))
             && (x.getVarAttrString().equals(y.getVarAttrString()));
     }
-    
+    @Test
     public void testSimpleAll() throws Exception {
         SimpleAll x = new SimpleAll();
         x.setVarFloat(3.14f);
@@ -812,7 +809,7 @@
             && equalsNilable(x.getVarString(), y.getVarString())
             && equalsNilable(x.getVarStruct(), y.getVarStruct());
     }
-    
+    @Test
     public void testStructWithOptionals() throws Exception {
         StructWithOptionals x = new StructWithOptionals();
         StructWithOptionals yOrig = new StructWithOptionals();
@@ -848,7 +845,7 @@
             && (x.getVarString().equals(y.getVarString()))
             && equals(x.getVarStructArray(), y.getVarStructArray());
     }
-    
+    @Test
     public void testRecursiveStruct() throws Exception {
         RecursiveStruct xtmp = new RecursiveStruct();
         xtmp.setVarFloat(0.14f);
@@ -915,7 +912,7 @@
         }
         return true;
     }
-    
+    @Test
     public void testRecursiveStructArray() throws Exception {
         RecursiveStruct xtmp = new RecursiveStruct();
         xtmp.setVarFloat(0.14f);
@@ -966,7 +963,7 @@
         }
         return false;
     }
-
+    @Test
     public void testRecursiveUnion() throws Exception {
         RecursiveUnion tmp1 = new RecursiveUnion();
         tmp1.setVarString("RecusiveUnion-1");
@@ -1018,7 +1015,7 @@
         return x.getVarInt() == y.getVarInt()
             && equals(x.getVarChoiceArray(), y.getVarChoiceArray());
     }
-
+    @Test
     public void testRecursiveUnionData() throws Exception {
         RecursiveUnion tmp1 = new RecursiveUnion();
         tmp1.setVarString("RecusiveUnion-1");
@@ -1076,7 +1073,7 @@
         }
         return true;
     }
-    
+    @Test
     public void testChoiceArray() throws Exception {
         RecursiveUnion tmp1 = new RecursiveUnion();
         tmp1.setVarString("RecusiveUnion-1");
@@ -1111,7 +1108,7 @@
     }
 
     //org.apache.type_test.types2.ExtendsSimpleType
-    
+    @Test
     public void testExtendsSimpleType() throws Exception {
         ExtendsSimpleType x = new ExtendsSimpleType();
         x.setValue("foo");
@@ -1135,7 +1132,7 @@
     }
     
     //org.apache.type_test.types1.ExtendsSimpleContent
-
+    @Test
     public void testExtendsSimpleContent() throws Exception {
         ExtendsSimpleContent x = new ExtendsSimpleContent();
         x.setValue("foo");
@@ -1165,7 +1162,7 @@
         assertEquals(msg, x.getValue(), y.getValue());
         assertEquals(msg, x.getID(), y.getID());
     }
-    
+    @Test
     public void testDocument() throws Exception {
         Document x = new Document();
         x.setValue("content-x");
@@ -1223,7 +1220,7 @@
             && (x.getAttrib2().equals(y.getAttrib2()))
             && (x.getValue().equals(y.getValue()));
     }
-    
+    @Test
     public void testExtColourEnum() throws Exception {
         ExtColourEnum x = new ExtColourEnum();
         x.setAttrib1(new Integer(1));
@@ -1257,7 +1254,7 @@
     protected boolean equals(ExtBase64Binary x, ExtBase64Binary y) {
         return x.getId() == y.getId() && Arrays.equals(x.getValue(), y.getValue());
     }
-
+    @Test
     public void testExtBase64Binary() throws Exception {
         ExtBase64Binary x1 = new ExtBase64Binary();
         x1.setValue("base64a".getBytes());
@@ -1298,7 +1295,7 @@
         }
         return false;
     }
-    
+    @Test
     public void testStructWithSubstitutionGroup() throws Exception {
         SgBaseTypeA baseA = new SgBaseTypeA();
         baseA.setVarInt(new BigInteger("1"));
@@ -1346,7 +1343,7 @@
         }
         return false;
     }
-
+    @Test
     public void testStructWithSubstitutionGroupAbstract() throws Exception {
         SgDerivedTypeB derivedB = new SgDerivedTypeB();
         derivedB.setVarInt(new BigInteger("32"));
@@ -1399,7 +1396,7 @@
             return equals(xTypeA, yTypeA);
         }
     }
-    
+    @Test
     public void testStructWithSubstitutionGroupNil() throws Exception {
         StructWithSubstitutionGroupNil x = new StructWithSubstitutionGroupNil();
         ObjectFactory objectFactory = new ObjectFactory();
@@ -1466,7 +1463,7 @@
         }
         return true;
     }
-    
+    @Test
     public void testStructWithMultipleSubstitutionGroups() throws Exception {
         SgBaseTypeA baseA = new SgBaseTypeA();
         baseA.setVarInt(new BigInteger("1"));
@@ -1534,7 +1531,7 @@
         }
         return false;
     }
-    
+    @Test
     public void testChoiceWithSubstitutionGroupAbstract() throws Exception {
         SgDerivedTypeB derivedB = new SgDerivedTypeB();
         derivedB.setVarInt(new BigInteger("32"));
@@ -1610,7 +1607,7 @@
             return y.getSg04NillableBaseElementA() == null;
         }
     }
-    
+    @Test
     public void testChoiceWithSubstitutionGroupNil() throws Exception {
         ObjectFactory objectFactory = new ObjectFactory();
         
@@ -1693,7 +1690,7 @@
         }
         return false;
     }
-
+    @Test
     public void testChoiceWithSubstitutionGroup() throws Exception {
         SgBaseTypeA baseA = new SgBaseTypeA();
         baseA.setVarInt(new BigInteger("1"));
@@ -1756,7 +1753,7 @@
         return x.getVarInt() == y.getVarInt()
             && equals(x.getRecElNext(), y.getRecElNext());
     }
-
+    @Test
     public void testRecElType() throws Exception {
         RecElType x = new RecElType();
         RecElType y = new RecElType();
@@ -1885,7 +1882,7 @@
         return x.getVarInt() == y.getVarInt()
             && equals(x.getRecOuterNext(), y.getRecOuterNext());
     }
-
+    @Test
     public void testRecOuterType() throws Exception {
         RecMostInnerType mitx = new RecMostInnerType();
         RecMostInnerType mity = new RecMostInnerType();
@@ -1948,7 +1945,7 @@
         assertEquals(msg, x.getAttrib1B(), y.getAttrib1B());
         assertEquals(msg, x.getValue(), y.getValue());
     }
-
+    @Test
     public void testSimpleContent1() throws Exception {
         SimpleContent1 x1 = new SimpleContent1();
         x1.setValue("foo");
@@ -1982,7 +1979,7 @@
         assertEquals(msg, x.getAttrib2B(), y.getAttrib2B());
         equals(msg, (SimpleContent1)x, (SimpleContent1)y);
     }
-
+    @Test
     public void testSimpleContent2() throws Exception {
         SimpleContent2 x2 = new SimpleContent2();
         x2.setValue("foo");
@@ -2020,7 +2017,7 @@
         assertEquals(msg, x.isAttrib3B(), y.isAttrib3B());
         equals(msg, (SimpleContent2)x, (SimpleContent2)y);
     }
-
+    @Test
     public void testSimpleContent3() throws Exception {
         SimpleContent3 x3 = new SimpleContent3();
         x3.setValue("foo");
@@ -2062,7 +2059,7 @@
         assertTrue(msg, y != null);
         assertEquals(msg, x.getValue(), y.getValue());
     }
-
+    @Test
     public void testUnionSimpleContent() throws Exception {
         UnionSimpleContent x = new UnionSimpleContent();
         x.setValue("5");

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient3.java Thu Mar  8 09:14:44 2007
@@ -74,12 +74,11 @@
 import org.apache.type_test.types3.OccuringStruct;
 import org.apache.type_test.types3.OccuringStruct1;
 import org.apache.type_test.types3.OccuringStruct2;
+import org.junit.Ignore;
+import org.junit.Test;
 
 public abstract class AbstractTypeTestClient3 extends AbstractTypeTestClient2 {
 
-    public AbstractTypeTestClient3(String name) {
-        super(name);
-    }
  
     protected boolean equals(ChoiceOfChoice x, ChoiceOfChoice y) {
         if (x.getVarInt() != null && y.getVarInt() != null) {
@@ -96,7 +95,8 @@
         }
         return false;
     }
-    
+
+    @Test
     public void testChoiceOfChoice() throws Exception {
         ChoiceOfChoice x = new ChoiceOfChoice();
         ChoiceOfChoice yOrig = new ChoiceOfChoice();
@@ -137,6 +137,7 @@
         return false;
     }
 
+    @Test
     public void testChoiceOfSeq() throws Exception {
         ChoiceOfSeq x = new ChoiceOfSeq();
         x.setVarInt(123);
@@ -173,7 +174,8 @@
             && (x.getAttrString1().equals(y.getAttrString1()))
             && (x.getAttrString2().equals(y.getAttrString2()));
     }
-    
+
+    @Test
     public void testDerivedStructBaseStruct() throws Exception {
         DerivedStructBaseStruct x = new DerivedStructBaseStruct();
         //Base
@@ -224,7 +226,8 @@
             && (x.getVarStringExt().equals(y.getVarStringExt()))
             && (x.getAttrString().equals(y.getAttrString()));
     }
-    
+
+    @Test
     public void testDerivedStructBaseChoice() throws Exception {
         DerivedStructBaseChoice x = new DerivedStructBaseChoice();
         //Base
@@ -271,7 +274,8 @@
         }
         return isEquals && equals((SimpleStruct)x, (SimpleStruct)y);
     }
-    
+
+    @Test
     public void testDerivedChoiceBaseStruct() throws Exception {
         DerivedChoiceBaseStruct x = new DerivedChoiceBaseStruct();
         //Base
@@ -324,7 +328,8 @@
         }
         return isEquals && equals((UnboundedArray)x, (UnboundedArray)y);
     }
-    
+
+    @Test
     public void testDerivedChoiceBaseArray() throws Exception {
         DerivedChoiceBaseArray x = new DerivedChoiceBaseArray();
         //Base
@@ -372,7 +377,8 @@
         }
         return isEquals && equals((SimpleChoice)x, (SimpleChoice)y);
     }
-    
+
+    @Test
     public void testDerivedChoiceBaseChoice() throws Exception {
         DerivedChoiceBaseChoice x = new DerivedChoiceBaseChoice();
         //Base
@@ -413,7 +419,8 @@
         return equals((SimpleStruct)x, (SimpleStruct)y)
             && x.getVarAttrString().equals(y.getVarAttrString());
     }
-    
+
+    @Test
     public void testDerivedNoContent() throws Exception {
         DerivedNoContent x = new DerivedNoContent();
         x.setVarFloat(3.14f);
@@ -453,7 +460,8 @@
             && (x.getVarStringExt().equals(y.getVarStringExt()))
             && (x.getAttrString().equals(y.getAttrString()));
     }
-    
+
+    @Test
     public void testDerivedStructBaseEmpty() throws Exception {
         DerivedStructBaseEmpty x = new DerivedStructBaseEmpty();
         //Derived
@@ -488,6 +496,7 @@
 
     //org.apache.type_test.types1.DerivedEmptyBaseEmptyAll
 
+    @Test
     public void testDerivedEmptyBaseEmptyAll() throws Exception {
         DerivedEmptyBaseEmptyAll x = new DerivedEmptyBaseEmptyAll();
         DerivedEmptyBaseEmptyAll yOrig = new DerivedEmptyBaseEmptyAll();
@@ -509,6 +518,7 @@
 
     //org.apache.type_test.types1.DerivedEmptyBaseEmptyChoice
 
+    @Test
     public void testDerivedEmptyBaseEmptyChoice() throws Exception {
         DerivedEmptyBaseEmptyChoice x = new DerivedEmptyBaseEmptyChoice();
         DerivedEmptyBaseEmptyChoice yOrig = new DerivedEmptyBaseEmptyChoice();
@@ -538,7 +548,8 @@
                 && x.getVarInt().compareTo(y.getVarInt()) == 0;
         }
     }
-    
+
+    @Test
     public void testRestrictedChoiceBaseChoice() throws Exception {
         RestrictedChoiceBaseChoice x = new RestrictedChoiceBaseChoice();
         x.setVarInt(12);
@@ -574,7 +585,8 @@
         return x.getAttrInt().compareTo(y.getAttrInt()) == 0
             && x.getAttrString().equals(y.getAttrString());
     }
-    
+
+    @Test
     public void testComplexTypeWithAttributeGroup() throws Exception {
         ComplexTypeWithAttributeGroup x = new ComplexTypeWithAttributeGroup();
         x.setAttrInt(new BigInteger("123"));
@@ -610,7 +622,8 @@
             && x.getAttrFloat().compareTo(y.getAttrFloat()) == 0
             && x.getAttrString().equals(y.getAttrString());
     }
-    
+
+    @Test
     public void testComplexTypeWithAttributeGroup1() throws Exception {
         ComplexTypeWithAttributeGroup1 x = new ComplexTypeWithAttributeGroup1();
         x.setAttrInt(new BigInteger("123"));
@@ -649,7 +662,8 @@
             && Float.compare(x.getVarOtherFloat(), y.getVarOtherFloat()) == 0
             && x.getVarOtherString().equals(y.getVarOtherString());
     }
-    
+
+    @Test
     public void testSequenceWithGroupSeq() throws Exception {
         SequenceWithGroupSeq x = new SequenceWithGroupSeq();
         x.setVarInt(100);         
@@ -719,7 +733,7 @@
         }
         return true;
     }
-    
+    @Test
     public void testSequenceWithGroupChoice() throws Exception {
         SequenceWithGroupChoice x = new SequenceWithGroupChoice();
         x.setVarFloat(1.1f);
@@ -770,7 +784,7 @@
             && Float.compare(x.getVarFloat(), y.getVarFloat()) == 0
             && x.getVarString().equals(y.getVarString());
     }
-    
+    @Test
     public void testSequenceWithGroups() throws Exception {
         SequenceWithGroups x = new SequenceWithGroups();
         x.setVarInt(100);
@@ -809,7 +823,7 @@
     protected boolean equals(SequenceWithOccuringGroup x, SequenceWithOccuringGroup y) {
         return equalsFloatIntStringList(x.getBatchElementsSeq(), y.getBatchElementsSeq());
     }
-    
+    @Test
     public void testSequenceWithOccuringGroup() throws Exception {
         SequenceWithOccuringGroup x = new SequenceWithOccuringGroup();
         x.getBatchElementsSeq().add(1.1f);
@@ -849,7 +863,7 @@
             && Float.compare(x.getVarFloat(), y.getVarFloat()) == 0
             && x.getAttr1().equals(y.getAttr1());
     }
-    
+    @Test
     public void testGroupDirectlyInComplexType() throws Exception {
         GroupDirectlyInComplexType x = new GroupDirectlyInComplexType();
         x.setVarInt(100);
@@ -889,6 +903,7 @@
             && x.getAttrString().equals(y.getAttrString());
     }
 
+    @Test
     public void testComplexTypeWithAttributes() throws Exception {
         ComplexTypeWithAttributes x = new ComplexTypeWithAttributes();
         x.setAttrInt(new BigInteger("123"));
@@ -952,7 +967,7 @@
             }
         }
     }
-    
+    @Test
     public void testStructWithAny() throws Exception {
         StructWithAny swa = new StructWithAny();
         swa.setName("Name");
@@ -992,6 +1007,7 @@
         }
     }
 
+    @Test
     public void testStructWithAnyXsi() throws Exception {
         StructWithAny swa = new StructWithAny();
         swa.setName("Name");
@@ -1039,6 +1055,7 @@
 
     // StructWithInvalidAny
     // XXX - no exception thrown
+    @Test
     public void testStructWithInvalidAny() throws Exception {
         StructWithAny swa = new StructWithAny();
         swa.setName("Name");
@@ -1090,6 +1107,7 @@
         }
     }
 
+    @Test
     public void testStructWithAnyArray() throws Exception {
         StructWithAnyArray swa = new StructWithAnyArray();
         swa.setName("Name");
@@ -1131,6 +1149,7 @@
 
     // StructWithInvalidAnyArray
     // XXX - no exception thrown
+    @Test
     public void testStructWithInvalidAnyArray() throws Exception {
         StructWithAnyArray swa = new StructWithAnyArray();
         swa.setName("Name");
@@ -1168,10 +1187,14 @@
         }
     }
 
+    @Test
+    @Ignore
     public void testStructWithAnyStrict() throws Exception {
         // XXX - only added to the soap typetest
     }
 
+    @Test
+    @Ignore
     public void testStructWithAnyArrayLax() throws Exception {
         // XXX - only added to the soap typetest
     }
@@ -1182,6 +1205,7 @@
         return equalsNilable(x.getId(), y.getId());
     }
 
+    @Test
     public void testIDTypeAttribute() throws Exception {
         // n.b. to be valid elements with an ID in the response message
         // must have a unique ID, so this test does not return x as the
@@ -1224,6 +1248,7 @@
         return true;
     }
 
+    @Test
     public void testMultipleOccursSequenceInSequence() throws Exception {
         MultipleOccursSequenceInSequence x = new MultipleOccursSequenceInSequence();
         x.getValue().add(new BigInteger("32"));
@@ -1259,7 +1284,7 @@
         return Arrays.equals(x.getBase64(), y.getBase64())
             && Arrays.equals(x.getHex(), y.getHex());
     }
-    
+    @Test
     public void testStructWithBinary() throws Exception {
         StructWithBinary x = new StructWithBinary();
         x.setBase64("base64Binary_x".getBytes());
@@ -1301,6 +1326,7 @@
         }
     }
 
+    @Test
     public void testChoiceWithBinary() throws Exception {
         ChoiceWithBinary x = new ChoiceWithBinary();
         x.setBase64("base64Binary_x".getBytes());
@@ -1354,6 +1380,7 @@
     }
 
     // XXX - Generated code flattens nested choice
+    @Test
     public void testChoiceWithGroupChoice() throws Exception {
         ChoiceWithGroupChoice x = new ChoiceWithGroupChoice();
         x.setVarFloat(1.1f);
@@ -1408,6 +1435,7 @@
     }
     
     // XXX - Generated code flattens nested structs
+    @Test
     public void testChoiceWithGroupSeq() throws Exception {
         ChoiceWithGroupSeq x = new ChoiceWithGroupSeq();
         x.setVarInt(100);
@@ -1465,6 +1493,7 @@
     }
     
     // XXX - Generated code flattens nested structs
+    @Test
     public void testChoiceWithGroups() throws Exception {
         ChoiceWithGroups x = new ChoiceWithGroups();
         x.setVarInt(100);
@@ -1500,6 +1529,7 @@
         return x.getId() == y.getId() && Arrays.equals(x.getValue(), y.getValue());
     }
 
+    @Test
     public void testExtBase64Binary() throws Exception {
         ExtBase64Binary x1 = new ExtBase64Binary();
         x1.setValue("base64a".getBytes());
@@ -1570,6 +1600,7 @@
         return true;
     }
 
+    @Test
     public void testStructWithAnyAttribute() throws Exception {
         QName xAt1Name = new QName("http://schemas.iona.com/type_test", "at_one");
         QName xAt2Name = new QName("http://schemas.iona.com/type_test", "at_two");
@@ -1648,6 +1679,7 @@
         return equalsQNameStringPairs(x.getOtherAttributes(), y.getOtherAttributes());
     }
 
+    @Test
     public void testChoiceWithAnyAttribute() throws Exception {
         QName xAt1Name = new QName("http://schemas.iona.com/type_test", "at_one");
         QName xAt2Name = new QName("http://schemas.iona.com/type_test", "at_two");
@@ -1735,7 +1767,7 @@
         }
         return true;
     }
-    
+    @Test
     public void testOccuringStruct() throws Exception {
         OccuringStruct x = new OccuringStruct();
         List<Serializable> theList = x.getVarFloatAndVarIntAndVarString(); 
@@ -1781,7 +1813,7 @@
         return equalsFloatIntStringList(x.getVarFloatAndVarIntAndVarString(),
                                         y.getVarFloatAndVarIntAndVarString());
     }
-    
+    @Test
     public void testOccuringStruct1() throws Exception {
         OccuringStruct1 x = new OccuringStruct1();
         List<Serializable> theList = x.getVarFloatAndVarIntAndVarString(); 
@@ -1848,6 +1880,7 @@
         return true;
     }
 
+    @Test
     public void testOccuringStruct2() throws Exception {
         OccuringStruct2 x = new OccuringStruct2();
         x.setVarFloat(1.14f);
@@ -1897,7 +1930,7 @@
         return equalsFloatIntStringList(x.getVarFloatOrVarIntOrVarString(),
                                         y.getVarFloatOrVarIntOrVarString());
     }
-    
+    @Test
     public void testOccuringChoice() throws Exception {
         OccuringChoice x = new OccuringChoice();
         List<Serializable> theList = x.getVarFloatOrVarIntOrVarString();
@@ -1985,7 +2018,7 @@
         }
         return true;
     }
-    
+    @Test
     public void testOccuringChoice1() throws Exception {
         OccuringChoice1 x = new OccuringChoice1();
         List<Comparable> theList = x.getVarFloatOrVarInt();
@@ -2029,6 +2062,7 @@
         return true;
     }
 
+    @Test
     public void testOccuringChoice2() throws Exception {
         OccuringChoice2 x = new OccuringChoice2();
         x.setVarString("x1");

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient4.java Thu Mar  8 09:14:44 2007
@@ -65,13 +65,10 @@
 import org.apache.type_test.types3.StructWithNillableStruct;
 import org.apache.type_test.types3.StructWithOccuringChoice;
 import org.apache.type_test.types3.StructWithOccuringStruct;
+import org.junit.Test;
 
 public abstract class AbstractTypeTestClient4 extends AbstractTypeTestClient3 {
 
-    public AbstractTypeTestClient4(String name) {
-        super(name);
-    }
-
     //org.apache.type_test.types2.SimpleContentExtWithAnyAttribute;
 
     protected boolean equals(SimpleContentExtWithAnyAttribute x,
@@ -85,6 +82,7 @@
         return equalsQNameStringPairs(x.getOtherAttributes(), y.getOtherAttributes());
     }
 
+    @Test
     public void testSimpleContentExtWithAnyAttribute() throws Exception {
         QName xAt1Name = new QName("http://apache.org/type_test", "at_one");
         QName xAt2Name = new QName("http://apache.org/type_test", "at_two");
@@ -139,6 +137,7 @@
         return x.getVarInt().compareTo(y.getVarInt()) == 0;
     }
 
+    @Test
     public void testOccuringAll() throws Exception {
         OccuringAll x = new OccuringAll();
         x.setVarInt(new Integer(42));
@@ -200,6 +199,7 @@
         return true;
     }
 
+    @Test
     public void testOccuringStructWithAnyAttribute() throws Exception {
         QName xAt1Name = new QName("http://apache.org/type_test", "at_one");
         QName xAt2Name = new QName("http://apache.org/type_test", "at_two");
@@ -267,6 +267,7 @@
         return equalsQNameStringPairs(x.getOtherAttributes(), y.getOtherAttributes());
     }
 
+    @Test
     public void testOccuringChoiceWithAnyAttribute() throws Exception {
         QName xAt1Name = new QName("http://schemas.iona.com/type_test", "at_one");
         QName xAt2Name = new QName("http://schemas.iona.com/type_test", "at_two");
@@ -338,6 +339,7 @@
             && equals(x.getSeqA(), y.getSeqA());
     }
 
+    @Test
     public void testMRecSeqA() throws Exception {
         MRecSeqA xA = new MRecSeqA();
         MRecSeqA yA = new MRecSeqA();
@@ -400,6 +402,7 @@
             && equals(x.getSeqC(), y.getSeqC());
     }
 
+    @Test
     public void testMRecSeqC() throws Exception {
         MRecSeqC xC = new MRecSeqC();
         MRecSeqC yC = new MRecSeqC();
@@ -460,6 +463,7 @@
         return x == null || x.getVarInt() == null && x.getVarString() == null;
     }
 
+    @Test
     public void testStructWithNillableChoice() throws Exception {
         // Test 1
         //
@@ -565,6 +569,7 @@
         return x == null || x.getVarIntOrVarString().size() == 0;
     }
 
+    @Test
     public void testStructWithOccuringChoice() throws Exception {
         // Test 1
         //
@@ -710,6 +715,7 @@
         return x.getVarInt() == null && x.getVarFloat() == null;
     }
 
+    @Test
     public void testStructWithNillableStruct() throws Exception {
         // Test 1
         //
@@ -841,6 +847,7 @@
     }
 
     
+    @Test
     public void testStructWithOccuringStruct() throws Exception {
         // Test 1
         //
@@ -907,6 +914,7 @@
 
     }
 
+    @Test
     public void testStructWithOccuringStruct2() throws Exception {
         StructWithOccuringStruct x = new StructWithOccuringStruct();
         x.setVarInteger(100);
@@ -986,6 +994,7 @@
             && x.getFoo().getBar().equals(y.getFoo().getBar());
     }
 
+    @Test
     public void testAnonymousType() throws Exception {
         AnonymousType x = new AnonymousType();
         AnonymousType.Foo fx = new AnonymousType.Foo();
@@ -1050,6 +1059,7 @@
         return true;
     }
 
+    @Test
     public void testRecSeqB6918() throws Exception {
         RecSeqB6918 x = new RecSeqB6918();
         List<Object> theList = x.getNextSeqAndVarInt();
@@ -1085,6 +1095,7 @@
      *  cos-all-limited.1.2: An 'all' model group must appear in a particle with
      *  {min occurs} = {max occurs} = 1, and that particle must be part of a
      *  pair which constitutes the {content type} of a complex type definition.
+     *
      
     //org.apache.type_test.types1.ComplexArray
      
@@ -1102,8 +1113,10 @@
         return true;
     }
 
+    @Test
+    @Ignore
     public void testComplexArray() throws Exception {
-        DerivedAllBaseStruct xx = new DerivedAllBaseStruct();
+        DerivedChoiceBaseStruct xx = new DerivedChoiceBaseStruct();
         //Base
         xx.setVarFloat(3.14f);
         xx.setVarInt(new BigInteger("42"));
@@ -1621,6 +1634,7 @@
             && (x.getVarAttrString().equals(y.getVarAttrString()));
     }
 
+    @Test
     public void testRestrictedStructBaseStruct() throws Exception {
         RestrictedStructBaseStruct x = new RestrictedStructBaseStruct();
         x.setVarFloat(3.14f);
@@ -1659,6 +1673,7 @@
             && (x.getVarAttrString().equals(y.getVarAttrString()));
     }
 
+    @Test
     public void testRestrictedAllBaseAll() throws Exception {
         RestrictedAllBaseAll x = new RestrictedAllBaseAll();
         x.setVarFloat(3.14f);
@@ -1691,6 +1706,7 @@
 
     //org.apache.type_test.types1.UnionWithStringList;
 
+    @Test
     public void testUnionWithStringList() throws Exception {
         if (testDocLiteral || testXMLBinding) {
             List<String> x = Arrays.asList("5");
@@ -1729,6 +1745,7 @@
 
     //org.apache.type_test.types1.UnionWithStringListRestriction;
 
+    @Test
     public void testUnionWithStringListRestriction() throws Exception {
         if (testDocLiteral || testXMLBinding) {
             List<String> x = Arrays.asList("5");
@@ -1767,6 +1784,7 @@
 
     //org.apache.type_test.types1.UnionWithAnonList;
 
+    @Test
     public void testUnionWithAnonList() throws Exception {
         if (testDocLiteral || testXMLBinding) {
             List<String> x = Arrays.asList("5");
@@ -1808,6 +1826,7 @@
         }
     }
 
+    @Test
     public void testAnyURIRestriction() throws Exception {
         // normal case, maxLength = 50 for anyURI
         String x = new String("http://cxf.apache.org/");
@@ -1847,6 +1866,7 @@
     // Test Inheritance
 
     // test internal inheritance
+    @Test
     public void testInheritanceNestedStruct() throws Exception {
         DerivedStructBaseStruct xs = new DerivedStructBaseStruct();
         //Base
@@ -1906,6 +1926,7 @@
     }
 
     // test first level inheritance (parameters)
+    @Test
     public void testInheritanceSimpleStructDerivedStruct() throws Exception {
         DerivedStructBaseStruct x = new DerivedStructBaseStruct();
         //Base
@@ -1952,6 +1973,7 @@
         }
     }
 
+    @Test
     public void testInheritanceSimpleChoiceDerivedStruct() throws Exception {
         DerivedStructBaseChoice x = new DerivedStructBaseChoice();
         //Base
@@ -1990,6 +2012,7 @@
         }
     }
 
+    @Test
     public void testInheritanceUnboundedArrayDerivedChoice() throws Exception {
         DerivedChoiceBaseArray x = new DerivedChoiceBaseArray();
         //Base
@@ -2025,6 +2048,7 @@
         }
     }
 
+    @Test
     public void testInheritanceEmptyAllDerivedEmpty() throws Exception {
         DerivedEmptyBaseEmptyAll x = new DerivedEmptyBaseEmptyAll();
         DerivedEmptyBaseEmptyAll yOrig = new DerivedEmptyBaseEmptyAll();

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient5.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient5.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient5.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient5.java Thu Mar  8 09:14:44 2007
@@ -25,15 +25,13 @@
 import org.apache.type_test.types1.ComplexRestriction3;
 import org.apache.type_test.types1.ComplexRestriction4;
 import org.apache.type_test.types1.ComplexRestriction5;
+import org.junit.Test;
 
 public abstract class AbstractTypeTestClient5 extends AbstractTypeTestClient4 {
 
-    public AbstractTypeTestClient5(String name) {
-        super(name);
-    }
-
     //org.apache.type_test.types1.ComplexRestriction
 
+    @Test
     public void testComplexRestriction() throws Exception {
         // normal case, maxLength=10
         ComplexRestriction x = new ComplexRestriction();
@@ -81,6 +79,7 @@
 
     //org.apache.type_test.types1.ComplexRestriction2
 
+    @Test
     public void testComplexRestriction2() throws Exception {
         // normal case, length=10
         ComplexRestriction2 x = new ComplexRestriction2();
@@ -128,6 +127,7 @@
 
     //org.apache.type_test.types1.ComplexRestriction3
 
+    @Test
     public void testComplexRestriction3() throws Exception {
         // normal case, maxLength=10 for ComplexRestriction
         // && minLength=5 for ComplexRestriction3
@@ -186,6 +186,7 @@
 
     //org.apache.type_test.types1.ComplexRestriction4
 
+    @Test
     public void testComplexRestriction4() throws Exception {
         // normal case, maxLength=10 for ComplexRestriction
         // && maxLength=5 for ComplexRestriction4
@@ -230,7 +231,7 @@
     }
 
     //org.apache.type_test.types1.ComplexRestriction5
-
+    @Test
     public void testComplexRestriction5() throws Exception {
         // normal case, maxLength=50 && minLength=5 for ComplexRestriction5
         ComplexRestriction5 x = new ComplexRestriction5();

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitClientTypeTest.java Thu Mar  8 09:14:44 2007
@@ -25,40 +25,26 @@
 import javax.xml.soap.SOAPFactory;
 import javax.xml.ws.Holder;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.apache.cxf.systest.common.ClientServerSetupBase;
 import org.apache.cxf.systest.type_test.AbstractTypeTestClient5;
 import org.apache.type_test.types2.StructWithAnyArrayLax;
 import org.apache.type_test.types2.StructWithAnyStrict;
+import org.junit.BeforeClass;
+import org.junit.Test;
 
 public class SOAPDocLitClientTypeTest extends AbstractTypeTestClient5 {
     protected static final String WSDL_PATH = "/wsdl/type_test/type_test_doclit_soap.wsdl";
     protected static final QName SERVICE_NAME = new QName("http://apache.org/type_test/doc", "SOAPService");
     protected static final QName PORT_NAME = new QName("http://apache.org/type_test/doc", "SOAPPort");
 
-    public SOAPDocLitClientTypeTest(String name) {
-        super(name);
+
+    @BeforeClass
+    public static void startServers() throws Exception {
+        boolean ok = launchServer(SOAPDocLitServerImpl.class);
+        assertTrue("failed to launch server", ok);
+        initClient(AbstractTypeTestClient5.class, SERVICE_NAME, PORT_NAME, WSDL_PATH);
     }
-    
-    
-    
-    public static Test suite() throws Exception {
-        TestSuite suite = new TestSuite(SOAPDocLitClientTypeTest.class);
-        return new ClientServerSetupBase(suite) {
-            public void startServers() throws Exception {
-                boolean ok = launchServer(SOAPDocLitServerImpl.class);
-                assertTrue("failed to launch server", ok);
-            }
-
-            public void setUp() throws Exception {
-                super.setUp();
-                initClient(AbstractTypeTestClient5.class, SERVICE_NAME, PORT_NAME, WSDL_PATH);
-            }
-        };
-    }  
 
+    @Test
     public void testStructWithAnyStrict() throws Exception {
         SOAPFactory factory = SOAPFactory.newInstance();
         SOAPElement elem = factory.createElement("StringElementQualified",
@@ -91,6 +77,7 @@
         }
     }
    
+    @Test
     public void testStructWithAnyStrictComplex() throws Exception {
         SOAPFactory factory = SOAPFactory.newInstance();
         SOAPElement elem = factory.createElement("AnonTypeElementQualified",
@@ -145,6 +132,7 @@
         }
     }
 
+    @Test
     public void testStructWithAnyArrayLax() throws Exception {
         SOAPFactory factory = SOAPFactory.newInstance();
         SOAPElement elem = factory.createElement("StringElementQualified", 
@@ -177,6 +165,7 @@
         }
     }
     
+    @Test
     public void testStructWithAnyArrayLaxComplex() throws Exception {
         SOAPFactory factory = SOAPFactory.newInstance();
         SOAPElement elem = factory.createElement("AnonTypeElementQualified", "x1",

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPDocLitServerImpl.java Thu Mar  8 09:14:44 2007
@@ -25,11 +25,11 @@
 
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.systest.common.TestServerBase;
 import org.apache.cxf.systest.type_test.TypeTestImpl;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.type_test.doc.TypeTestPortType;
 
-public class SOAPDocLitServerImpl extends TestServerBase {
+public class SOAPDocLitServerImpl extends AbstractBusTestServerBase {
     
 
     public void run()  {

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitClientTypeTest.java Thu Mar  8 09:14:44 2007
@@ -25,13 +25,11 @@
 import javax.xml.soap.SOAPFactory;
 import javax.xml.ws.Holder;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.apache.cxf.systest.common.ClientServerSetupBase;
 import org.apache.cxf.systest.type_test.AbstractTypeTestClient5;
 import org.apache.type_test.types2.StructWithAnyArrayLax;
 import org.apache.type_test.types2.StructWithAnyStrict;
+import org.junit.BeforeClass;
+import org.junit.Test;
 
 public class SOAPRpcLitClientTypeTest extends AbstractTypeTestClient5 {
     protected static final String WSDL_PATH = "/wsdl/type_test/type_test_rpclit_soap.wsdl";
@@ -40,24 +38,14 @@
 
     protected static final QName PORT_NAME = new QName("http://apache.org/type_test/rpc", "SOAPPort");
 
-    public SOAPRpcLitClientTypeTest(String name) {
-        super(name);
-    }
-
-    public static Test suite() throws Exception {
-        TestSuite suite = new TestSuite(SOAPRpcLitClientTypeTest.class);
-        return new ClientServerSetupBase(suite) {
-            public void startServers() throws Exception {
-                boolean ok = launchServer(SOAPRpcLitServerImpl.class);
-                assertTrue("failed to launch server", ok);
-            }
-            public void setUp() throws Exception {
-                super.setUp();
-                initClient(AbstractTypeTestClient5.class, SERVICE_NAME, PORT_NAME, WSDL_PATH);
-            }                
-        };
-    }
+    @BeforeClass
+    public static void startServers() throws Exception {
+        boolean ok = launchServer(SOAPRpcLitServerImpl.class);
+        assertTrue("failed to launch server", ok);
+        initClient(AbstractTypeTestClient5.class, SERVICE_NAME, PORT_NAME, WSDL_PATH);
+    }                
     
+    @Test
     public void testStructWithAnyStrict() throws Exception {
         SOAPFactory factory = SOAPFactory.newInstance();
         SOAPElement elem = factory.createElement("StringElementQualified", "tns",
@@ -89,6 +77,7 @@
         }
     }
 
+    @Test
     public void testStructWithAnyStrictComplex() throws Exception {
         SOAPFactory factory = SOAPFactory.newInstance();
         SOAPElement elem = factory.createElement("AnonTypeElementQualified", "tns",
@@ -138,6 +127,7 @@
         }
     }
 
+    @Test
     public void testStructWithAnyArrayLax() throws Exception {
         SOAPFactory factory = SOAPFactory.newInstance();
         SOAPElement elem = factory.createElement("StringElementQualified", "tns",
@@ -169,6 +159,7 @@
         }
     }
 
+    @Test
     public void testStructWithAnyArrayLaxComplex() throws Exception {
         SOAPFactory factory = SOAPFactory.newInstance();
         SOAPElement elem = factory.createElement("AnonTypeElementQualified", "tns",

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/soap/SOAPRpcLitServerImpl.java Thu Mar  8 09:14:44 2007
@@ -21,11 +21,11 @@
 import javax.jws.WebService;
 import javax.xml.ws.Endpoint;
 
-import org.apache.cxf.systest.common.TestServerBase;
 import org.apache.cxf.systest.type_test.TypeTestImpl;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.type_test.rpc.TypeTestPortType;
 
-public class SOAPRpcLitServerImpl extends TestServerBase {
+public class SOAPRpcLitServerImpl extends AbstractBusTestServerBase {
 
     public void run()  {
         Object implementor = new SOAPTypeTestImpl();

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/xml/XMLClientTypeTest.java Thu Mar  8 09:14:44 2007
@@ -20,41 +20,19 @@
 
 import javax.xml.namespace.QName;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.apache.cxf.systest.common.ClientServerSetupBase;
 import org.apache.cxf.systest.type_test.AbstractTypeTestClient5;
+import org.junit.BeforeClass;
 
 public class XMLClientTypeTest extends AbstractTypeTestClient5 {
     static final String WSDL_PATH = "/wsdl/type_test/type_test_xml.wsdl";
     static final QName SERVICE_NAME = new QName("http://apache.org/type_test/xml", "XMLService");
     static final QName PORT_NAME = new QName("http://apache.org/type_test/xml", "XMLPort");
 
-    public XMLClientTypeTest(String name) {
-        super(name);
-    }
-    
-    public static Test suite() throws Exception {
-        TestSuite suite = new TestSuite(XMLClientTypeTest.class);
-        return new ClientServerSetupBase(suite) {
-            public void startServers() throws Exception {
-                boolean ok = launchServer(XMLServerImpl.class); 
-                assertTrue("failed to launch server", ok);
-            }
-            
-//            public void setUp() throws Exception {
-//                // set up configuration to enable schema validation
-//                URL url = getClass().getResource("../celtix-config.xml"); 
-//                assertNotNull("cannot find test resource", url);
-//                configFileName = url.toString(); 
-//                super.setUp();
-//            }
-            public void setUp() throws Exception {
-                super.setUp();
-                initClient(AbstractTypeTestClient5.class, SERVICE_NAME, PORT_NAME, WSDL_PATH);
-            }
 
-        };
+    @BeforeClass
+    public static void startServers() throws Exception {
+        boolean ok = launchServer(XMLServerImpl.class); 
+        assertTrue("failed to launch server", ok);
+        initClient(AbstractTypeTestClient5.class, SERVICE_NAME, PORT_NAME, WSDL_PATH);
     }  
 }

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/xml/XMLServerImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/xml/XMLServerImpl.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/xml/XMLServerImpl.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/type_test/xml/XMLServerImpl.java Thu Mar  8 09:14:44 2007
@@ -23,11 +23,11 @@
 
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.systest.common.TestServerBase;
 import org.apache.cxf.systest.type_test.TypeTestImpl;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.type_test.xml.TypeTestPortType;
 
-public class XMLServerImpl extends TestServerBase {
+public class XMLServerImpl extends AbstractBusTestServerBase {
 
     public void run()  {
         SpringBusFactory sf = new SpringBusFactory();

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTest.java Thu Mar  8 09:14:44 2007
@@ -19,7 +19,8 @@
 
 package org.apache.cxf.systest.ws.addressing;
 
-import junit.framework.Test;
+import org.junit.Test;
+
 
 /**
  * Tests the addition of WS-Addressing Message Addressing Properties.
@@ -29,12 +30,14 @@
     private static final String CONFIG =
         "org/apache/cxf/systest/ws/addressing/cxf.xml";
     
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(MAPTest.class);
+    public String getConfigFileName() {
+        return CONFIG;
     }
     
-    public static Test suite() throws Exception {
-        return getSuite(MAPTest.class, CONFIG);
+    @Test
+    public void foo() {
+        
     }
+
 }
 

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/MAPTestBase.java Thu Mar  8 09:14:44 2007
@@ -30,15 +30,11 @@
 import javax.xml.ws.BindingProvider;
 import javax.xml.ws.ProtocolException;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.interceptor.Interceptor;
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractClientServerTestBase;
 import org.apache.cxf.ws.addressing.AddressingProperties;
 import org.apache.cxf.ws.addressing.AddressingPropertiesImpl;
 import org.apache.cxf.ws.addressing.AttributedURIType;
@@ -50,6 +46,12 @@
 import org.apache.hello_world_soap_http.Greeter;
 import org.apache.hello_world_soap_http.NoSuchCodeLitFault;
 import org.apache.hello_world_soap_http.SOAPService;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
 
 import static org.apache.cxf.ws.addressing.JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES;
 
@@ -57,7 +59,7 @@
 /**
  * Tests the addition of WS-Addressing Message Addressing Properties.
  */
-public abstract class MAPTestBase extends ClientServerTestBase implements VerificationCache {
+public abstract class MAPTestBase extends AbstractClientServerTestBase implements VerificationCache {
 
     static final String INBOUND_KEY = "inbound";
     static final String OUTBOUND_KEY = "outbound";
@@ -71,51 +73,65 @@
         new QName("http://apache.org/hello_world_soap_http", "SoapPort");
     private static final String NOWHERE = "http://nowhere.nada.nothing.nought:5555";
     private static final String DECOUPLED = "http://localhost:9999/decoupled_endpoint";
+    
     private static Map<Object, Map<String, String>> messageIDs =
         new HashMap<Object, Map<String, String>>();
+    private static Bus staticBus;
+    
     private Greeter greeter;
     private String verified;
+    
+    
 
-    public static Test getSuite(Class clz, final String config) throws Exception {
-        TestSuite suite = new TestSuite(clz);
-        return new ClientServerSetupBase(suite) {
-            public void startServers() throws Exception {
-                // special case handling for WS-Addressing system test to avoid
-                // UUID related issue when server is run as separate process
-                // via maven on Win2k
-                boolean inProcess = "Windows 2000".equals(System.getProperty("os.name"));
-                assertTrue("server did not launch correctly", 
-                           launchServer(Server.class, inProcess));
-            }
-            
-            public void setUp() throws Exception {
-                startServers();
-
-                SpringBusFactory bf = new SpringBusFactory();
-                Bus bus = bf.createBus(config);
-                BusFactory.setDefaultBus(bus);
-                setBus(bus);
-
-                mapVerifier = new MAPVerifier();
-                headerVerifier = new HeaderVerifier();
-                Interceptor[] interceptors = {mapVerifier, headerVerifier };
-                addInterceptors(getBus().getInInterceptors(), interceptors);
-                addInterceptors(getBus().getOutInterceptors(), interceptors);
-                addInterceptors(getBus().getOutFaultInterceptors(), interceptors);
-                addInterceptors(getBus().getInFaultInterceptors(), interceptors);
-            }
-            
-            private void addInterceptors(List<Interceptor> chain,
-                                         Interceptor[] interceptors) {
-                for (int i = 0; i < interceptors.length; i++) {
-                    chain.add(interceptors[i]);
-                }
-            }
-        };
+    @BeforeClass
+    public static void startServers() throws Exception {
+        // special case handling for WS-Addressing system test to avoid
+        // UUID related issue when server is run as separate process
+        // via maven on Win2k
+        boolean inProcess = "Windows 2000".equals(System.getProperty("os.name"));
+        assertTrue("server did not launch correctly", 
+                   launchServer(Server.class, inProcess));
     }
-
+    
+    @AfterClass
+    public static void shutdownBus() throws Exception {
+        staticBus.shutdown(true);
+    }
+    
+    private void addInterceptors(List<Interceptor> chain,
+                                     Interceptor[] interceptors) {
+        for (int i = 0; i < interceptors.length; i++) {
+            chain.add(interceptors[i]);
+        }
+    }
+    private void removeInterceptors(List<Interceptor> chain,
+                                 Interceptor[] interceptors) {
+        for (int i = 0; i < interceptors.length; i++) {
+            chain.add(interceptors[i]);
+        }
+    }
+    
+    public abstract String getConfigFileName();
+    
+    @Before
     public void setUp() throws Exception {
-        super.setUp();
+        //super.setUp();
+        
+        if (staticBus == null) {
+            SpringBusFactory bf = new SpringBusFactory();
+            staticBus = bf.createBus(getConfigFileName());
+            BusFactory.setDefaultBus(staticBus);
+        }
+                
+        messageIDs.clear();
+        mapVerifier = new MAPVerifier();
+        headerVerifier = new HeaderVerifier();
+        Interceptor[] interceptors = {mapVerifier, headerVerifier };
+        addInterceptors(staticBus.getInInterceptors(), interceptors);
+        addInterceptors(staticBus.getOutInterceptors(), interceptors);
+        addInterceptors(staticBus.getOutFaultInterceptors(), interceptors);
+        addInterceptors(staticBus.getInFaultInterceptors(), interceptors);
+        
         URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
         SOAPService service = new SOAPService(wsdl, SERVICE_NAME);
         greeter = (Greeter)service.getPort(PORT_NAME, Greeter.class);
@@ -123,12 +139,22 @@
         headerVerifier.verificationCache = this;
     }
     
-    public void tearDown() {
+    @After
+    public void tearDown() throws Exception {
+        Interceptor[] interceptors = {mapVerifier, headerVerifier };
+        removeInterceptors(staticBus.getInInterceptors(), interceptors);
+        removeInterceptors(staticBus.getOutInterceptors(), interceptors);
+        removeInterceptors(staticBus.getOutFaultInterceptors(), interceptors);
+        removeInterceptors(staticBus.getInFaultInterceptors(), interceptors);
+        
+        mapVerifier = null;
+        headerVerifier = null;
         verified = null;
+        messageIDs.clear();
     }
         
     //--Tests
-     
+    @Test
     public void testImplicitMAPs() throws Exception {
         try {
             String greeting = greeter.greetMe("implicit1");
@@ -146,7 +172,9 @@
         }
     }
 
-    public void xtestExplicitMAPs() throws Exception {
+    @Test
+    @Ignore
+    public void testExplicitMAPs() throws Exception {
         try {
             Map<String, Object> requestContext = 
                 ((BindingProvider)greeter).getRequestContext();
@@ -185,7 +213,9 @@
         }
     }
     
-    public void xtestFaultTo() throws Exception {
+    @Test
+    @Ignore
+    public void testFaultTo() throws Exception {
         try {
             String greeting = greeter.greetMe("warmup");
             assertEquals("unexpected response received from service", 
@@ -212,6 +242,7 @@
         }
     }
     
+    @Test
     public void testOneway() throws Exception {
         try {
             greeter.greetMeOneWay("implicit_oneway1");
@@ -221,6 +252,8 @@
         }
     }
     
+    
+    @Test
     public void testApplicationFault() throws Exception {
         try {
             greeter.testDocLitFault("BadRecordLitFault");
@@ -243,7 +276,9 @@
             throw (Exception)ex.getCause();
         }
     }
+    
 
+    @Test
     public void testVersioning() throws Exception {
         try {
             // expect two MAPs instances versioned with 200408, i.e. for both 

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/NonDecoupledTest.java Thu Mar  8 09:14:44 2007
@@ -19,8 +19,6 @@
 
 package org.apache.cxf.systest.ws.addressing;
 
-import junit.framework.Test;
-
 
 /**
  * Tests the addition of WS-Addressing Message Addressing Properties
@@ -30,13 +28,9 @@
 
     private static final String CONFIG =
         "org/apache/cxf/systest/ws/addressing/wsa_interceptors.xml";
-    
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(NonDecoupledTest.class);
-    }
-    
-    public static Test suite() throws Exception {
-        return getSuite(NonDecoupledTest.class, CONFIG);
+
+    public String getConfigFileName() {
+        return CONFIG;
     }
 }
 

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/Server.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/Server.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/addressing/Server.java Thu Mar  8 09:14:44 2007
@@ -30,9 +30,9 @@
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.interceptor.Interceptor;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
-public class Server extends TestServerBase implements VerificationCache {
+public class Server extends AbstractBusTestServerBase implements VerificationCache {
     
     private String verified;
  

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/PolicyClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/PolicyClientServerTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/PolicyClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/policy/PolicyClientServerTest.java Thu Mar  8 09:14:44 2007
@@ -23,9 +23,6 @@
 
 import javax.xml.ws.Endpoint;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
@@ -34,21 +31,21 @@
 import org.apache.cxf.greeter_control.PingMeFault;
 import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.interceptor.LoggingOutInterceptor;
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.junit.BeforeClass;
+import org.junit.Test;
 
 
 /**
  * Tests the use of the WS-Policy Framework to automatically engage WS-Addressing and
  * WS-RM in response to Policies defined for the endpoint via an external policy attachment.
  */
-public class PolicyClientServerTest extends ClientServerTestBase {
+public class PolicyClientServerTest extends AbstractBusClientServerTestBase {
 
     private static final Logger LOG = Logger.getLogger(PolicyClientServerTest.class.getName());
-    private Bus bus;
 
-    public static class Server extends TestServerBase {
+    public static class Server extends AbstractBusTestServerBase {
     
         protected void run()  {            
             SpringBusFactory bf = new SpringBusFactory();
@@ -80,25 +77,13 @@
             }
         }
     }    
-    
-    public static Test suite() throws Exception {
-        TestSuite suite = new TestSuite(PolicyClientServerTest.class);
-        return new ClientServerSetupBase(suite) {
-            public void startServers() throws Exception {
-                assertTrue("server did not launch correctly", launchServer(Server.class));
-            }
-            
-            public void setUp() throws Exception {
-                startServers();
-                LOG.fine("Started server.");  
-            }
-        };
-    }
-    
-    public void tearDown() {
-        bus.shutdown(true);
+
+    @BeforeClass
+    public static void startServers() throws Exception {
+        assertTrue("server did not launch correctly", launchServer(Server.class));
     }
-    
+         
+    @Test
     public void testUsingAddressing() throws Exception {
         SpringBusFactory bf = new SpringBusFactory();
         bus = bf.createBus("org/apache/cxf/systest/ws/policy/addr-only.xml");
@@ -134,8 +119,8 @@
             greeter.pingMe();
             fail("Expected PingMeFault not thrown.");
         } catch (PingMeFault ex) {
-            assertEquals(2, ex.getFaultInfo().getMajor());
-            assertEquals(1, ex.getFaultInfo().getMinor());
+            assertEquals(2, (int)ex.getFaultInfo().getMajor());
+            assertEquals(1, (int)ex.getFaultInfo().getMinor());
         } 
     }
 }

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledBareTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledBareTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledBareTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledBareTest.java Thu Mar  8 09:14:44 2007
@@ -23,32 +23,29 @@
 
 import javax.xml.ws.Endpoint;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.hello_world_soap_http.DocLitBare;
 import org.apache.hello_world_soap_http.DocLitBareGreeterImpl;
 import org.apache.hello_world_soap_http.SOAPServiceAddressingDocLitBare;
 import org.apache.hello_world_soap_http.types.BareDocumentResponse;
-
+import org.junit.BeforeClass;
+import org.junit.Test;
 
 
 /**
  * Tests the addition of WS-RM properties to application messages and the
  * exchange of WS-RM protocol messages.
  */
-public class DecoupledBareTest extends ClientServerTestBase {
+public class DecoupledBareTest extends AbstractBusClientServerTestBase {
 
     private static final Logger LOG = Logger.getLogger(DecoupledBareTest.class.getName());
-    private Bus bus;
 
-    public static class Server extends TestServerBase {
+    public static class Server extends AbstractBusTestServerBase {
         
         protected void run()  {            
             SpringBusFactory bf = new SpringBusFactory();
@@ -75,24 +72,12 @@
         }
     }    
     
-    public static Test suite() throws Exception {
-        TestSuite suite = new TestSuite(DecoupledBareTest.class);
-        return new ClientServerSetupBase(suite) {
-            public void startServers() throws Exception {
-                assertTrue("server did not launch correctly", launchServer(Server.class));
-            }
-            
-            public void setUp() throws Exception {
-                startServers();
-                LOG.fine("Started server.");  
-            }
-        };
-    }
-    
-    public void tearDown() {
-        bus.shutdown(true);
+    @BeforeClass
+    public static void startServers() throws Exception {
+        assertTrue("server did not launch correctly", launchServer(Server.class));
     }
     
+    @Test
     public void testDecoupled() throws Exception {
         SpringBusFactory bf = new SpringBusFactory();
         bus = bf.createBus("/org/apache/cxf/systest/ws/rm/decoupled_bare.xml");

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java Thu Mar  8 09:14:44 2007
@@ -23,9 +23,6 @@
 
 import javax.xml.ws.Endpoint;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
@@ -33,21 +30,22 @@
 import org.apache.cxf.greeter_control.GreeterService;
 import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.interceptor.LoggingOutInterceptor;
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+import org.junit.BeforeClass;
+import org.junit.Test;
 
 
 /**
  * Tests the addition of WS-RM properties to application messages and the
  * exchange of WS-RM protocol messages.
  */
-public class DecoupledClientServerTest extends ClientServerTestBase {
+public class DecoupledClientServerTest extends AbstractBusClientServerTestBase {
 
     private static final Logger LOG = Logger.getLogger(DecoupledClientServerTest.class.getName());
     private Bus bus;
 
-    public static class Server extends TestServerBase {
+    public static class Server extends AbstractBusTestServerBase {
         
         protected void run()  {            
             SpringBusFactory bf = new SpringBusFactory();
@@ -81,24 +79,12 @@
         }
     }    
     
-    public static Test suite() throws Exception {
-        TestSuite suite = new TestSuite(DecoupledClientServerTest.class);
-        return new ClientServerSetupBase(suite) {
-            public void startServers() throws Exception {
-                assertTrue("server did not launch correctly", launchServer(Server.class));
-            }
-            
-            public void setUp() throws Exception {
-                startServers();
-                LOG.fine("Started server.");  
-            }
-        };
-    }
-    
-    public void tearDown() {
-        bus.shutdown(true);
+    @BeforeClass
+    public static void startServers() throws Exception {
+        assertTrue("server did not launch correctly", launchServer(Server.class));
     }
-    
+            
+    @Test
     public void testDecoupled() throws Exception {
         SpringBusFactory bf = new SpringBusFactory();
         bus = bf.createBus("/org/apache/cxf/systest/ws/rm/decoupled.xml");

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java Thu Mar  8 09:14:44 2007
@@ -24,9 +24,6 @@
 import java.util.List;
 import java.util.logging.Logger;
 
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
@@ -35,20 +32,23 @@
 import org.apache.cxf.greeter_control.Greeter;
 import org.apache.cxf.greeter_control.GreeterService;
 import org.apache.cxf.interceptor.Interceptor;
-import org.apache.cxf.systest.common.ClientServerSetupBase;
-import org.apache.cxf.systest.common.ClientServerTestBase;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.ws.rm.RMConstants;
 import org.apache.cxf.ws.rm.RMInInterceptor;
 import org.apache.cxf.ws.rm.RMManager;
 import org.apache.cxf.ws.rm.RMOutInterceptor;
 import org.apache.cxf.ws.rm.soap.RMSoapInterceptor;
+import org.junit.After;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
 
 
 /**
  * Tests the addition of WS-RM properties to application messages and the
  * exchange of WS-RM protocol messages.
  */
-public class SequenceTest extends ClientServerTestBase {
+public class SequenceTest extends AbstractBusClientServerTestBase {
 
     private static final Logger LOG = Logger.getLogger(SequenceTest.class.getName());
     // private static final String APP_NAMESPACE ="http://celtix.objectweb.org/greeter_control";
@@ -84,31 +84,20 @@
     private boolean doTestTwowayNonAnonymousNoOffer = testAll;
     private boolean doTestConcurrency = testAll;
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(SequenceTest.class);
+    @BeforeClass
+    public static void startServers() throws Exception {
+        /*
+        // special case handling for WS-Addressing system test to avoid
+        // UUID related issue when server is run as separate process
+        // via maven on Win2k
+        boolean inProcess = "Windows 2000".equals(System.getProperty("os.name"));
+        assertTrue("server did not launch correctly", launchServer(Server.class, inProcess));
+        */
+        assertTrue("server did not launch correctly", launchServer(Server.class));
     }
-    
-    public static Test suite() throws Exception {
-        TestSuite suite = new TestSuite(SequenceTest.class);
-        return new ClientServerSetupBase(suite) {
-            public void startServers() throws Exception {
-                /*
-                // special case handling for WS-Addressing system test to avoid
-                // UUID related issue when server is run as separate process
-                // via maven on Win2k
-                boolean inProcess = "Windows 2000".equals(System.getProperty("os.name"));
-                assertTrue("server did not launch correctly", launchServer(Server.class, inProcess));
-                */
-                assertTrue("server did not launch correctly", launchServer(Server.class));
-            }
             
-            public void setUp() throws Exception {
-                startServers();
-                LOG.fine("Started server.");  
-            }
-        };
-    }
     
+    @After
     public void tearDown() {
         if (null != greeter) {
             assertTrue("Failed to stop greeter.", control.stopGreeter());                        
@@ -129,7 +118,9 @@
       * The (oneway) application request should be dispatched straight to the
       * implementor.
       */
-    public void xtestRMServerPlainClient() throws Exception {
+    @Test
+    @Ignore
+    public void testRMServerPlainClient() throws Exception {
 
         SpringBusFactory bf = new SpringBusFactory();
         
@@ -165,6 +156,7 @@
 
     // --- tests ---
     
+    @Test
     public void testOnewayAnonymousAcks() throws Exception {
         if (!doTestOnewayAnonymousAcks) {
             return;
@@ -196,6 +188,7 @@
         mf.verifyAcknowledgements(new boolean[] {false, true, true, true}, false);
     }
     
+    @Test
     public void testOnewayDeferredAnonymousAcks() throws Exception {
         if (!doTestOnewayDeferredAnonymousAcks) {
             return;
@@ -234,6 +227,7 @@
         mf.verifyAcknowledgements(new boolean[] {false, false, false, true}, false);
     }
     
+    @Test
     public void testOnewayDeferredNonAnonymousAcks() throws Exception {
         if (!doTestOnewayDeferredNonAnonymousAcks) {
             return;
@@ -287,6 +281,7 @@
 
     }
     
+    @Test
     public void testOnewayAnonymousAcksSequenceLength1() throws Exception {
         if (!doTestOnewayAnonymousAcksSequenceLength1) {
             return;
@@ -329,6 +324,7 @@
         mf.verifyAcknowledgements(new boolean[] {false, true, false, false, true, false}, false);
     }
     
+    @Test
     public void testOnewayAnonymousAcksSupressed() throws Exception {
 
         if (!doTestOnewayAnonymousAcksSupressed) {
@@ -376,6 +372,7 @@
         
     }
     
+    @Test
     public void testTwowayNonAnonymous() throws Exception {
         if (!doTestTwowayNonAnonymous) {
             return;
@@ -425,6 +422,7 @@
 
     // the same as above but using endpoint specific interceptor configuration
 
+    @Test
     public void testTwowayNonAnonymousEndpointSpecific() throws Exception {
         if (!doTestTwowayNonAnonymousEndpointSpecific) {
             return;
@@ -473,6 +471,7 @@
         mf.verifyAcknowledgements(new boolean[] {false, true, true, true}, false);
     }
 
+    @Test
     public void testTwowayNonAnonymousDeferred() throws Exception {
         if (!doTestTwowayNonAnonymousDeferred) {
             return;
@@ -537,7 +536,7 @@
      * standalone sequence acknowledgment needs to be sent regardless of whether
      * or nor acknowledgments are delivered steadily with every response.
      */
-
+    @Test
     public void testTwowayNonAnonymousMaximumSequenceLength2() throws Exception {
 
         if (!doTestTwowayNonAnonymousMaximumSequenceLength2) {
@@ -596,7 +595,7 @@
         expected[5] = true;
         mf.verifyAcknowledgements(expected, false);
     }
-    
+    @Test    
     public void testOnewayMessageLoss() throws Exception {
         if (!doTestOnewayMessageLoss) {
             return;
@@ -646,6 +645,7 @@
   
     }
     
+    @Test
     public void testTwowayMessageLoss() throws Exception {
         if (!doTestTwowayMessageLoss) {
             return;
@@ -702,6 +702,7 @@
   
     }
     
+    @Test
     public void testTwowayNonAnonymousNoOffer() throws Exception {
         if (!doTestTwowayNonAnonymousNoOffer) {
             return;
@@ -737,6 +738,7 @@
         mf.verifyAcknowledgements(new boolean[] {false, false, false}, false);
     }
 
+    @Test
     public void testConcurrency() throws Exception {
         if (!doTestConcurrency) {
             return;

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/Server.java?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/Server.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/Server.java Thu Mar  8 09:14:44 2007
@@ -25,9 +25,9 @@
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
-import org.apache.cxf.systest.common.TestServerBase;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
-public class Server extends TestServerBase {
+public class Server extends AbstractBusTestServerBase {
    
     private static final String ADDRESS = "http://localhost:9001/SoapContext/ControlPort";
  

Modified: incubator/cxf/trunk/testutils/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/pom.xml?view=diff&rev=516103&r1=516102&r2=516103
==============================================================================
--- incubator/cxf/trunk/testutils/pom.xml (original)
+++ incubator/cxf/trunk/testutils/pom.xml Thu Mar  8 09:14:44 2007
@@ -51,6 +51,11 @@
             <groupId>org.apache.geronimo.specs</groupId>
             <artifactId>geronimo-annotation_1.0_spec</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
     </dependencies>
 
 

Added: incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusClientServerTestBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusClientServerTestBase.java?view=auto&rev=516103
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusClientServerTestBase.java (added)
+++ incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusClientServerTestBase.java Thu Mar  8 09:14:44 2007
@@ -0,0 +1,132 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.testutil.common;
+
+
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.junit.After;
+import org.junit.AfterClass;
+
+public abstract class AbstractBusClientServerTestBase extends AbstractClientServerTestBase {
+
+    static {
+        System.setProperty("javax.xml.ws.spi.Provider", "org.apache.cxf.jaxws.spi.ProviderImpl");
+    }
+    
+    protected static String defaultConfigFileName;
+    protected static Bus staticBus; 
+    
+    protected String configFileName = defaultConfigFileName;
+    protected Bus bus = staticBus; 
+
+    public void createBus(String config) throws Exception {
+        configFileName = config;
+        createBus();
+    }
+    
+    public void createBus() throws Exception {
+        if (configFileName != null) {
+            System.setProperty("cxf.config.file", configFileName);
+        }
+        BusFactory bf = BusFactory.newInstance();
+        bus = bf.createBus();
+        BusFactory.setDefaultBus(bus);
+    }
+    
+    public static void createStaticBus(String config) throws Exception {
+        defaultConfigFileName = config;
+        createStaticBus();
+    }
+    public static void createStaticBus() throws Exception {
+        if (defaultConfigFileName != null) {
+            System.setProperty("cxf.config.file", defaultConfigFileName);
+        }
+        BusFactory bf = BusFactory.newInstance();
+        staticBus = bf.createBus();
+        BusFactory.setDefaultBus(staticBus);  
+    }
+    
+    @After
+    public void deleteBus() throws Exception {
+        if (null != bus) {
+            bus.shutdown(true);
+            bus = null;
+        }
+        if (configFileName != null) {
+            System.clearProperty("cxf.config.file");
+        }
+    } 
+    @AfterClass
+    public static void deleteStaticBus() throws Exception {
+        if (null != staticBus) {
+            staticBus.shutdown(true);
+            staticBus = null;
+        }
+        if (defaultConfigFileName != null) {
+            System.clearProperty("cxf.config.file");
+        }
+    } 
+
+
+    protected Bus getBus() {
+        if (bus == null) {
+            return staticBus;
+        }
+        return bus;
+    }
+
+    protected void setBus(Bus b) {
+        bus = b;
+    }
+    
+    
+    protected HttpURLConnection getHttpConnection(String target) throws Exception {
+        URL url = new URL(target);        
+        
+        URLConnection connection = url.openConnection();            
+        
+        assertTrue(connection instanceof HttpURLConnection);
+        return (HttpURLConnection)connection;        
+    }
+
+    protected boolean runClient(Runnable clientImpl, long timeOut, TimeUnit timeUnit)
+        throws InterruptedException {
+        FutureTask<?> client = new FutureTask<Object>(clientImpl, null);
+        ThreadPoolExecutor tpe = new ThreadPoolExecutor(1, 1, 10000L, TimeUnit.MILLISECONDS,
+                new LinkedBlockingQueue<Runnable>());
+        tpe.execute(client);
+        tpe.shutdown();
+        tpe.awaitTermination(timeOut, timeUnit);
+        if (!client.isDone()) {
+            return false;
+        }
+        return true;
+    }
+}

Propchange: incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusClientServerTestBase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusClientServerTestBase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusTestServerBase.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusTestServerBase.java?view=auto&rev=516103
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusTestServerBase.java (added)
+++ incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusTestServerBase.java Thu Mar  8 09:14:44 2007
@@ -0,0 +1,45 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.testutil.common;
+
+import org.apache.cxf.Bus;
+
+public abstract class AbstractBusTestServerBase extends AbstractTestServerBase {
+    
+    private Bus bus;
+    
+    public boolean stopInProcess() throws Exception {
+        boolean ret = super.stopInProcess();
+        if (bus != null) {
+            bus.shutdown(true);
+        }
+        return ret;
+    }    
+    
+    public Bus getBus() {
+        return bus; 
+    }
+    
+    public void setBus(Bus b) {
+        bus = b; 
+    }
+
+    
+}

Propchange: incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusTestServerBase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/testutils/src/main/java/org/apache/cxf/testutil/common/AbstractBusTestServerBase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message