Author: veithen
Date: Wed Jul 29 19:40:49 2009
New Revision: 799034
URL: http://svn.apache.org/viewvc?rev=799034&view=rev
Log:
DOOMs factories are stateful and should not be created in the constructor of a
test case (otherwise the test can't be executed multiple times with different
decorators). Moved the code from the constructor to the setUp method.
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAPFaultDetailTestBase.java
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAPTestCase.java
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPHeaderTestCase.java
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAPFaultDetailTestBase.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAPFaultDetailTestBase.java?rev=799034&r1=799033&r2=799034&view=diff
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAPFaultDetailTestBase.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAPFaultDetailTestBase.java
Wed Jul 29 19:40:49 2009
@@ -35,12 +35,12 @@
public SOAPFaultDetailTestBase(OMMetaFactory omMetaFactory) {
super(omMetaFactory);
- omNamespace =
- omFactory.createOMNamespace("http://www.test.org", "test");
}
protected void setUp() throws Exception {
super.setUp();
+ omNamespace =
+ omFactory.createOMNamespace("http://www.test.org", "test");
soap11FaultDetail = soap11Factory.createSOAPFaultDetail(soap11Fault);
soap12FaultDetail = soap12Factory.createSOAPFaultDetail(soap12Fault);
soap11FaultDetailWithParser = soap11FaultWithParser.getDetail();
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAPTestCase.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAPTestCase.java?rev=799034&r1=799033&r2=799034&view=diff
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAPTestCase.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/test/java/org/apache/axiom/soap/SOAPTestCase.java
Wed Jul 29 19:40:49 2009
@@ -44,14 +44,15 @@
public SOAPTestCase(OMMetaFactory omMetaFactory) {
this.omMetaFactory = omMetaFactory;
- soap11Factory = omMetaFactory.getSOAP11Factory();
- soap12Factory = omMetaFactory.getSOAP12Factory();
- omFactory = omMetaFactory.getOMFactory();
}
protected void setUp() throws Exception {
super.setUp();
+ soap11Factory = omMetaFactory.getSOAP11Factory();
+ soap12Factory = omMetaFactory.getSOAP12Factory();
+ omFactory = omMetaFactory.getOMFactory();
+
soap11Envelope = soap11Factory.createSOAPEnvelope();
soap12Envelope = soap12Factory.createSOAPEnvelope();
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPHeaderTestCase.java
URL:
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPHeaderTestCase.java?rev=799034&r1=799033&r2=799034&view=diff
==============================================================================
---
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPHeaderTestCase.java
(original)
+++
webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/soap/SOAPHeaderTestCase.java
Wed Jul 29 19:40:49 2009
@@ -31,12 +31,12 @@
public SOAPHeaderTestCase(OMMetaFactory omMetaFactory) {
super(omMetaFactory);
- namespace =
- omFactory.createOMNamespace("http://www.example.org", "test");
}
protected void setUp() throws Exception {
super.setUp();
+ namespace =
+ omFactory.createOMNamespace("http://www.example.org", "test");
soap11Header = soap11Factory.createSOAPHeader(soap11Envelope);
soap12Header = soap12Factory.createSOAPHeader(soap12Envelope);
soap11HeaderWithParser = soap11EnvelopeWithParser.getHeader();