Author: dkulp
Date: Fri Dec 18 20:02:11 2009
New Revision: 892362
URL: http://svn.apache.org/viewvc?rev=892362&view=rev
Log:
Merged revisions 892360 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r892360 | dkulp | 2009-12-18 14:52:52 -0500 (Fri, 18 Dec 2009) | 2 lines
Don't use deprecated Spring base test class. Use the better JUnit4
version
........
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/AbstractInvocationHandlerTest.java
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/HandlerTestBase.java
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactoryTest.java
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvokingInvocationHandlerTest.java
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ObjectMethodInvocationHandlerTest.java
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandlerTest.java
cxf/branches/2.2.x-fixes/parent/pom.xml
cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
cxf/branches/2.2.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWsTest.java
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/CharacterSchemaTest.java
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/MtomTest.java
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/wsdl/CrossSchemaImportsTests.java
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 18 20:02:11 2009
@@ -1 +1 @@
-/cxf/trunk:891375-891393,891452,891817,891827,891859,891945-891946,892056,892307
+/cxf/trunk:891375-891393,891452,891817,891827,891859,891945-891946,892056,892307,892360
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/AbstractInvocationHandlerTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/AbstractInvocationHandlerTest.java?rev=892362&r1=892361&r2=892362&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/AbstractInvocationHandlerTest.java
(original)
+++
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/AbstractInvocationHandlerTest.java
Fri Dec 18 20:02:11 2009
@@ -29,9 +29,6 @@
public AbstractInvocationHandlerTest() {
}
- public AbstractInvocationHandlerTest(String name) {
- super(name);
- }
// seach for the setNext method
@Test
Modified:
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/HandlerTestBase.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/HandlerTestBase.java?rev=892362&r1=892361&r2=892362&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/HandlerTestBase.java
(original)
+++
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/HandlerTestBase.java
Fri Dec 18 20:02:11 2009
@@ -47,10 +47,7 @@
public HandlerTestBase() {
}
-
- public HandlerTestBase(String aName) {
-
- }
+
@Before
public void setUp() {
Modified:
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactoryTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactoryTest.java?rev=892362&r1=892361&r2=892362&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactoryTest.java
(original)
+++
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvocationHandlerFactoryTest.java
Fri Dec 18 20:02:11 2009
@@ -41,9 +41,6 @@
super();
}
- public InvocationHandlerFactoryTest(String name) {
- super(name);
- }
@Before
public void setUp() {
Modified:
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvokingInvocationHandlerTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvokingInvocationHandlerTest.java?rev=892362&r1=892361&r2=892362&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvokingInvocationHandlerTest.java
(original)
+++
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/InvokingInvocationHandlerTest.java
Fri Dec 18 20:02:11 2009
@@ -35,10 +35,6 @@
CXFInvocationHandler handler;
CXFInvocationHandlerData data;
- public InvokingInvocationHandlerTest(String name) {
- super(name);
- }
-
public InvokingInvocationHandlerTest() {
super();
}
Modified:
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ObjectMethodInvocationHandlerTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ObjectMethodInvocationHandlerTest.java?rev=892362&r1=892361&r2=892362&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ObjectMethodInvocationHandlerTest.java
(original)
+++
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ObjectMethodInvocationHandlerTest.java
Fri Dec 18 20:02:11 2009
@@ -39,9 +39,6 @@
public ObjectMethodInvocationHandlerTest() {
super();
}
- public ObjectMethodInvocationHandlerTest(String name) {
- super(name);
- }
@Before
public void setUp() {
Modified:
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandlerTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandlerTest.java?rev=892362&r1=892361&r2=892362&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandlerTest.java
(original)
+++
cxf/branches/2.2.x-fixes/integration/jca/src/test/java/org/apache/cxf/jca/cxf/handlers/ProxyInvocationHandlerTest.java
Fri Dec 18 20:02:11 2009
@@ -35,10 +35,7 @@
public ProxyInvocationHandlerTest() {
super();
}
-
- public ProxyInvocationHandlerTest(String name) {
- super(name);
- }
+
@Before
public void setUp() {
Modified: cxf/branches/2.2.x-fixes/parent/pom.xml
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/parent/pom.xml?rev=892362&r1=892361&r2=892362&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/parent/pom.xml (original)
+++ cxf/branches/2.2.x-fixes/parent/pom.xml Fri Dec 18 20:02:11 2009
@@ -387,7 +387,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.4</version>
+ <version>4.7</version>
<scope>test</scope>
</dependency>
Modified:
cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java?rev=892362&r1=892361&r2=892362&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
(original)
+++
cxf/branches/2.2.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
Fri Dec 18 20:02:11 2009
@@ -129,12 +129,13 @@
}
private Destination resolveDestinationName(final JmsTemplate jmsTemplate,
final String name) {
- return (Destination)jmsTemplate.execute(new SessionCallback() {
+ SessionCallback sc = new SessionCallback() {
public Object doInJms(Session session) throws JMSException {
DestinationResolver resolv =
jmsTemplate.getDestinationResolver();
return resolv.resolveDestinationName(session, name,
jmsConfig.isPubSubDomain());
}
- });
+ };
+ return (Destination)jmsTemplate.execute(sc);
}
public Destination getReplyToDestination(JmsTemplate jmsTemplate, Message
inMessage) throws JMSException {
Modified:
cxf/branches/2.2.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java?rev=892362&r1=892361&r2=892362&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
(original)
+++
cxf/branches/2.2.x-fixes/rt/transports/jms/src/test/java/org/apache/cxf/transport/jms/JMSConduitTest.java
Fri Dec 18 20:02:11 2009
@@ -173,11 +173,12 @@
JMSConfiguration jmsConfig = conduit.getJmsConfig();
JmsTemplate jmsTemplate = new JmsTemplate();
jmsTemplate.setConnectionFactory(jmsConfig.getOrCreateWrappedConnectionFactory());
- javax.jms.Message message = (javax.jms.Message)jmsTemplate.execute(new
SessionCallback() {
+ SessionCallback sc = new SessionCallback() {
public Object doInJms(Session session) throws JMSException {
return JMSUtils.createAndSetPayload(testBytes, session,
JMSConstants.BYTE_MESSAGE_TYPE);
}
- });
+ };
+ javax.jms.Message message = (javax.jms.Message)jmsTemplate.execute(sc);
// The ibm jdk finalizes conduit (during most runs of this test) and
// causes it to fail unless we reference the conduit here after the
Modified:
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWsTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWsTest.java?rev=892362&r1=892361&r2=892362&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWsTest.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/AegisJaxWsTest.java
Fri Dec 18 20:02:11 2009
@@ -28,24 +28,23 @@
import org.apache.cxf.systest.aegis.bean.Item;
import org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor;
+import org.junit.Assert;
import org.junit.Test;
-import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
+
+import org.springframework.test.context.ContextConfiguration;
+import
org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
/**
*
*/
-public class AegisJaxWsTest extends
AbstractDependencyInjectionSpringContextTests {
+...@contextconfiguration(locations = { "classpath:aegisJaxWsBeans.xml" })
+public class AegisJaxWsTest extends AbstractJUnit4SpringContextTests {
private AegisJaxWs client;
public AegisJaxWsTest() {
}
- @Override
- protected String[] getConfigLocations() {
- return new String[] {"classpath:aegisJaxWsBeans.xml"};
- }
-
private void setupForTest(boolean sec) throws Exception {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
@@ -72,16 +71,16 @@
public void testGetItemSecure() throws Exception {
setupForTest(true);
Item item = client.getItemByKey(" jack&jill ", "b");
- assertEquals(33, item.getKey().intValue());
- assertEquals(" jack&jill :b", item.getData());
+ Assert.assertEquals(33, item.getKey().intValue());
+ Assert.assertEquals(" jack&jill :b", item.getData());
}
@Test
public void testGetItem() throws Exception {
setupForTest(false);
Item item = client.getItemByKey(" a ", "b");
- assertEquals(33, item.getKey().intValue());
- assertEquals(" a :b", item.getData());
+ Assert.assertEquals(33, item.getKey().intValue());
+ Assert.assertEquals(" a :b", item.getData());
}
@Test
public void testMapSpecified() throws Exception {
@@ -92,14 +91,14 @@
client.addItem(item);
Map<Integer, Item> items = client.getItemsMapSpecified();
- assertNotNull(items);
- assertEquals(1, items.size());
+ Assert.assertNotNull(items);
+ Assert.assertEquals(1, items.size());
Map.Entry<Integer, Item> entry = items.entrySet().iterator().next();
- assertNotNull(entry);
+ Assert.assertNotNull(entry);
Item item2 = entry.getValue();
Integer key2 = entry.getKey();
- assertEquals(42, key2.intValue());
- assertEquals("Godzilla", item2.getData());
+ Assert.assertEquals(42, key2.intValue());
+ Assert.assertEquals("Godzilla", item2.getData());
}
}
Modified:
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/CharacterSchemaTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/CharacterSchemaTest.java?rev=892362&r1=892361&r2=892362&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/CharacterSchemaTest.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/CharacterSchemaTest.java
Fri Dec 18 20:02:11 2009
@@ -30,13 +30,19 @@
import org.apache.cxf.aegis.type.basic.CharacterAsStringType;
import org.apache.cxf.endpoint.Server;
import org.apache.cxf.test.TestUtilities;
+
+import org.junit.Assert;
import org.junit.Test;
-import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
+
+import org.springframework.test.context.ContextConfiguration;
+import
org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
+
/**
*
*/
-public class CharacterSchemaTest extends
AbstractDependencyInjectionSpringContextTests {
+...@contextconfiguration(locations = { "classpath:aegisSportsServiceBeans.xml"
})
+public class CharacterSchemaTest extends AbstractJUnit4SpringContextTests {
private TestUtilities testUtilities;
@@ -44,11 +50,6 @@
testUtilities = new TestUtilities(getClass());
}
- @Override
- protected String[] getConfigLocations() {
- return new String[] {"classpath:aegisSportsServiceBeans.xml"};
- }
-
@Test
public void testSchema() throws Exception {
testUtilities.setBus((Bus)applicationContext.getBean("cxf"));
@@ -57,9 +58,9 @@
Server s = testUtilities.
getServerForService(new
QName("http://aegis.systest.cxf.apache.org/",
"SportsService"));
- assertNotNull(s);
+ Assert.assertNotNull(s);
Document wsdl = testUtilities.getWSDLDocument(s);
- assertNotNull(wsdl);
+ Assert.assertNotNull(wsdl);
NodeList typeAttrList =
testUtilities.assertValid("//xsd:complexty...@name='BeanWithCharacter']/xsd:sequence"
+ "/xsd:eleme...@name='character']"
@@ -69,11 +70,11 @@
String typeAttrValue = typeAttr.getValue();
// now, this thing is a qname with a :, and we have to work out if
it's correct.
String[] pieces = typeAttrValue.split(":");
-
assertEquals(CharacterAsStringType.CHARACTER_AS_STRING_TYPE_QNAME.getLocalPart(),
+
Assert.assertEquals(CharacterAsStringType.CHARACTER_AS_STRING_TYPE_QNAME.getLocalPart(),
pieces[1]);
Node elementNode = typeAttr.getOwnerElement();
String url = testUtilities.resolveNamespacePrefix(pieces[0],
elementNode);
-
assertEquals(CharacterAsStringType.CHARACTER_AS_STRING_TYPE_QNAME.getNamespaceURI(),
+
Assert.assertEquals(CharacterAsStringType.CHARACTER_AS_STRING_TYPE_QNAME.getNamespaceURI(),
url);
}
}
Modified:
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/MtomTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/MtomTest.java?rev=892362&r1=892361&r2=892362&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/MtomTest.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/aegis/mtom/MtomTest.java
Fri Dec 18 20:02:11 2009
@@ -39,13 +39,18 @@
import org.apache.cxf.systest.aegis.mtom.fortest.DataHandlerBean;
import org.apache.cxf.systest.aegis.mtom.fortest.MtomTestImpl;
import org.apache.cxf.test.TestUtilities;
+
+import org.junit.Assert;
import org.junit.Test;
-import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
+
+import org.springframework.test.context.ContextConfiguration;
+import
org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
/**
*
*/
-public class MtomTest extends AbstractDependencyInjectionSpringContextTests {
+...@contextconfiguration(locations = { "classpath:mtomTestBeans.xml" })
+public class MtomTest extends AbstractJUnit4SpringContextTests {
private org.apache.cxf.systest.aegis.mtom.fortest.MtomTestImpl impl;
private org.apache.cxf.systest.aegis.mtom.fortest.MtomTest client;
@@ -55,11 +60,6 @@
testUtilities = new TestUtilities(getClass());
}
- @Override
- protected String[] getConfigLocations() {
- return new String[] {"classpath:mtomTestBeans.xml"};
- }
-
private void setupForTest(boolean enableClientMTOM) throws Exception {
AegisDatabinding aegisBinding = new AegisDatabinding();
aegisBinding.setMtomEnabled(enableClientMTOM);
@@ -82,8 +82,8 @@
public void testMtomReply() throws Exception {
setupForTest(true);
DataHandlerBean dhBean = client.produceDataHandlerBean();
- assertNotNull(dhBean);
- assertEquals(MtomTestImpl.STRING_DATA,
dhBean.getDataHandler().getContent());
+ Assert.assertNotNull(dhBean);
+ Assert.assertEquals(MtomTestImpl.STRING_DATA,
dhBean.getDataHandler().getContent());
}
@Test
@@ -97,10 +97,10 @@
dhBean.setDataHandler(dataHandler);
client.acceptDataHandler(dhBean);
DataHandlerBean accepted = impl.getLastDhBean();
- assertNotNull(accepted);
+ Assert.assertNotNull(accepted);
String data = (String) accepted.getDataHandler().getContent();
- assertNotNull(data);
- assertEquals("This is the cereal shot from guns.", data);
+ Assert.assertNotNull(data);
+ Assert.assertEquals("This is the cereal shot from guns.", data);
}
@Test
@@ -114,10 +114,10 @@
dhBean.setDataHandler(dataHandler);
client.acceptDataHandler(dhBean);
DataHandlerBean accepted = impl.getLastDhBean();
- assertNotNull(accepted);
+ Assert.assertNotNull(accepted);
Object data = accepted.getDataHandler().getContent();
- assertNotNull(data);
- assertEquals("This is the cereal shot from guns.", data);
+ Assert.assertNotNull(data);
+ Assert.assertEquals("This is the cereal shot from guns.", data);
}
@Test
@@ -129,7 +129,7 @@
getServerForService(new
QName("http://fortest.mtom.aegis.systest.cxf.apache.org/",
"MtomTest"));
Document wsdl = testUtilities.getWSDLDocument(s);
- assertNotNull(wsdl);
+ Assert.assertNotNull(wsdl);
NodeList typeAttrList =
testUtilities.assertValid("//xsd:complexty...@name='inputDhBean']/xsd:sequence/"
+ "xsd:eleme...@name='dataHandler']/"
@@ -139,14 +139,14 @@
String typeAttrValue = typeAttr.getValue();
// now, this thing is a qname with a :, and we have to work out if
it's correct.
String[] pieces = typeAttrValue.split(":");
- assertEquals("base64Binary", pieces[1]);
+ Assert.assertEquals("base64Binary", pieces[1]);
Node elementNode = typeAttr.getOwnerElement();
String url = testUtilities.resolveNamespacePrefix(pieces[0],
elementNode);
- assertEquals(SOAPConstants.XSD, url);
+ Assert.assertEquals(SOAPConstants.XSD, url);
s =
testUtilities.getServerForAddress("http://localhost:9002/mtomXmime");
wsdl = testUtilities.getWSDLDocument(s);
- assertNotNull(wsdl);
+ Assert.assertNotNull(wsdl);
typeAttrList =
testUtilities.assertValid("//xsd:complexty...@name='inputDhBean']/xsd:sequence/"
+ "xsd:eleme...@name='dataHandler']/"
@@ -156,10 +156,10 @@
typeAttrValue = typeAttr.getValue();
// now, this thing is a qname with a :, and we have to work out if
it's correct.
pieces = typeAttrValue.split(":");
- assertEquals("base64Binary", pieces[1]);
+ Assert.assertEquals("base64Binary", pieces[1]);
elementNode = typeAttr.getOwnerElement();
url = testUtilities.resolveNamespacePrefix(pieces[0], elementNode);
- assertEquals(AbstractXOPType.XML_MIME_NS, url);
+ Assert.assertEquals(AbstractXOPType.XML_MIME_NS, url);
/* when I add a test for a custom mapping.
testUtilities.assertValid("//xsd:complexty...@name='inputDhBean']/xsd:sequence/"
Modified:
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java?rev=892362&r1=892361&r2=892362&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/databinding/src/test/java/org/apache/cxf/systest/jaxb/TestServiceTest.java
Fri Dec 18 20:02:11 2009
@@ -33,39 +33,42 @@
import org.apache.cxf.systest.jaxb.model.Widget;
import org.apache.cxf.systest.jaxb.service.TestService;
import org.apache.cxf.test.TestUtilities;
+
+import org.junit.Assert;
import org.junit.Test;
-import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
+import org.springframework.test.context.ContextConfiguration;
+import
org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
-public class TestServiceTest extends
AbstractDependencyInjectionSpringContextTests {
+...@contextconfiguration(locations = { "classpath:extrajaxbclass.xml" })
+public class TestServiceTest extends AbstractJUnit4SpringContextTests {
- private TestService testClient;
private TestUtilities testUtilities;
public TestServiceTest() {
-
setAutowireMode(AbstractDependencyInjectionSpringContextTests.AUTOWIRE_BY_NAME);
testUtilities = new TestUtilities(getClass());
}
@Test
public void testExtraSubClassWithJaxb() throws Throwable {
Widget expected = new ExtendedWidget(42, "blah", "blah", true, true);
-
+ TestService testClient = getTestClient();
Widget widgetFromService = testClient.getWidgetById((long)42);
- assertEquals(expected, widgetFromService);
+ Assert.assertEquals(expected, widgetFromService);
}
@Test
public void testExtraSubClassWithJaxbFromEndpoint() throws Throwable {
Widget expected = new ExtendedWidget(42, "blah", "blah", true, true);
-
+
+ TestService testClient = getTestClient();
((BindingProvider)testClient).getRequestContext()
.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
"http://localhost:7081/service/TestEndpoint");
Widget widgetFromService = testClient.getWidgetById((long)42);
- assertEquals(expected, widgetFromService);
+ Assert.assertEquals(expected, widgetFromService);
}
@@ -73,7 +76,7 @@
public void testSchema() throws Exception {
URL url = new URL("http://localhost:7081/service/TestService?wsdl");
String s = IOUtils.toString(url.openStream());
- assertTrue(s, s.contains("application/octet-stream"));
+ Assert.assertTrue(s, s.contains("application/octet-stream"));
}
@Test
@@ -92,27 +95,11 @@
+
"/xsd:sequence/xsd:eleme...@name='publicString']", wsdl);
}
- /*
- * (non-Javadoc)
- *
- * @see
org.springframework.test.AbstractSingleSpringContextTests#getConfigLocations()
- */
- @Override
- protected String[] getConfigLocations() {
- return new String[] {"classpath:extrajaxbclass.xml"};
- }
/**
* @return the testClient
*/
public TestService getTestClient() {
- return testClient;
- }
-
- /**
- * @param testClient the testClient to set
- */
- public void setTestClient(TestService testClient) {
- this.testClient = testClient;
+ return (TestService)applicationContext.getBean("testClient",
TestService.class);
}
}
Modified:
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/wsdl/CrossSchemaImportsTests.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/wsdl/CrossSchemaImportsTests.java?rev=892362&r1=892361&r2=892362&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/wsdl/CrossSchemaImportsTests.java
(original)
+++
cxf/branches/2.2.x-fixes/systests/uncategorized/src/test/java/org/apache/cxf/systest/wsdl/CrossSchemaImportsTests.java
Fri Dec 18 20:02:11 2009
@@ -25,22 +25,24 @@
import org.apache.cxf.Bus;
import org.apache.cxf.endpoint.Server;
import org.apache.cxf.test.TestUtilities;
+
+import org.junit.Assert;
import org.junit.Test;
-import org.springframework.test.AbstractDependencyInjectionSpringContextTests;
+import org.springframework.test.context.ContextConfiguration;
+import
org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
-public class CrossSchemaImportsTests extends
AbstractDependencyInjectionSpringContextTests {
+...@contextconfiguration(locations = { "classpath:crossSchemaBeans.xml" })
+public class CrossSchemaImportsTests extends AbstractJUnit4SpringContextTests {
private TestUtilities testUtilities;
public CrossSchemaImportsTests() {
-
setAutowireMode(AbstractDependencyInjectionSpringContextTests.AUTOWIRE_BY_NAME);
testUtilities = new TestUtilities(getClass());
}
@Test
public void testJaxbCrossSchemaImport() throws Exception {
- System.out.println("TEst");
testUtilities.setBus((Bus)applicationContext.getBean("cxf"));
testUtilities.addDefaultNamespaces();
Server s = testUtilities.getServerForService(new
QName("http://apache.org/type_test/doc",
@@ -50,16 +52,7 @@
assertValid("//xsd:sche...@targetnamespace='http://apache.org/type_test/doc']/"
+
"xsd:impo...@namespace='http://apache.org/type_test/types1']", wsdl);
- assertEquals(1, LifeCycleListenerTester.getInitCount());
+ Assert.assertEquals(1, LifeCycleListenerTester.getInitCount());
}
- /*
- * (non-Javadoc)
- *
- * @see
org.springframework.test.AbstractSingleSpringContextTests#getConfigLocations()
- */
- @Override
- protected String[] getConfigLocations() {
- return new String[] {"classpath:crossSchemaBeans.xml"};
- }
}