You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2009/02/25 11:59:27 UTC
svn commit: r747742 - in /servicemix/smx4/nmr/trunk: ./
jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/artifacts/
jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/descriptor/
jbi/runtime/src/test/java/org/apache/servicemix/j...
Author: gnodet
Date: Wed Feb 25 10:59:26 2009
New Revision: 747742
URL: http://svn.apache.org/viewvc?rev=747742&view=rev
Log:
Clean up dependencies (and move back to junit 3.8 to avoid using 2 different versions)
Modified:
servicemix/smx4/nmr/trunk/jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/artifacts/ServiceAssemblyImplTest.java
servicemix/smx4/nmr/trunk/jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/descriptor/ConnectionTest.java
servicemix/smx4/nmr/trunk/jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/descriptor/DescriptorFactoryTest.java
servicemix/smx4/nmr/trunk/jbi/runtime/src/test/java/org/apache/servicemix/jbi/runtime/IntegrationTest.java
servicemix/smx4/nmr/trunk/jbi/runtime/src/test/java/org/apache/servicemix/jbi/runtime/impl/utils/DOMUtilTest.java
servicemix/smx4/nmr/trunk/nmr/api/src/test/java/org/apache/servicemix/nmr/api/MEPCompatibilityTest.java
servicemix/smx4/nmr/trunk/nmr/api/src/test/java/org/apache/servicemix/nmr/api/service/ServiceHelperTest.java
servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/EndpointRegistryImplTest.java
servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/ExchangeImplTest.java
servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/IntegrationTest.java
servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/MessageImplTest.java
servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/ServiceMixTest.java
servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/util/FilterIteratorTest.java
servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/util/MapToDictionaryTest.java
servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/util/StringSourceTest.java
servicemix/smx4/nmr/trunk/pom.xml
Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/artifacts/ServiceAssemblyImplTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/artifacts/ServiceAssemblyImplTest.java?rev=747742&r1=747741&r2=747742&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/artifacts/ServiceAssemblyImplTest.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/artifacts/ServiceAssemblyImplTest.java Wed Feb 25 10:59:26 2009
@@ -16,12 +16,9 @@
*/
package org.apache.servicemix.jbi.deployer.artifacts;
-import static org.junit.Assert.*;
-
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
-import java.util.Map;
import org.apache.servicemix.jbi.deployer.ServiceAssembly;
import org.apache.servicemix.jbi.deployer.artifacts.AbstractLifecycleJbiArtifact.State;
@@ -31,24 +28,21 @@
import org.apache.servicemix.nmr.api.Wire;
import org.jmock.Expectations;
import org.jmock.Mockery;
-import org.junit.Before;
-import org.junit.Test;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.prefs.Preferences;
+import junit.framework.TestCase;
/**
* Test cases for {@link ServiceAssemblyImpl}
*/
-public class ServiceAssemblyImplTest {
+public class ServiceAssemblyImplTest extends TestCase {
private Mockery mockery;
- @Before
- public void setup() {
+ public void setUp() {
mockery = new Mockery();
}
- @Test
public void testWiringOnServiceAssemblyConnections() throws Exception {
ServiceAssemblyDesc descriptor = DescriptorFactory.buildDescriptor(DescriptorFactory.class.getResource("serviceAssembly.xml")).getServiceAssembly();
final Preferences prefs = mockery.mock(Preferences.class);
Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/descriptor/ConnectionTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/descriptor/ConnectionTest.java?rev=747742&r1=747741&r2=747742&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/descriptor/ConnectionTest.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/descriptor/ConnectionTest.java Wed Feb 25 10:59:26 2009
@@ -16,8 +16,6 @@
*/
package org.apache.servicemix.jbi.deployer.descriptor;
-import static org.junit.Assert.*;
-
import java.util.Map;
import javax.xml.namespace.QName;
@@ -25,12 +23,12 @@
import org.apache.servicemix.nmr.api.Endpoint;
import org.apache.servicemix.nmr.api.Wire;
import org.apache.servicemix.nmr.api.service.ServiceHelper;
-import org.junit.Test;
+import junit.framework.TestCase;
/**
* Test case for {@link Connection}
*/
-public class ConnectionTest {
+public class ConnectionTest extends TestCase {
private static final String CONSUMER_ENDPOINT = "consumer-endpoint";
private static final QName CONSUMER_INTERFACE = new QName("urn:test:consumer", "consumer-inferface");
@@ -38,8 +36,7 @@
private static final String PROVIDER_ENDPOINT = "provider-endpoint";
private static final QName PROVIDER_SERVICE = new QName("urn:test:provider", "provider-service");
- @Test
- public void wireOnInterface() throws Exception {
+ public void testWireOnInterface() throws Exception {
Connection connection = new Connection();
Consumer consumer = new Consumer();
consumer.setInterfaceName(CONSUMER_INTERFACE);
@@ -54,8 +51,7 @@
assertWireToEnd(wire);
}
- @Test
- public void wireOnServiceAndEndpoint() throws Exception {
+ public void testWireOnServiceAndEndpoint() throws Exception {
Connection connection = new Connection();
Consumer consumer = new Consumer();
consumer.setServiceName(CONSUMER_SERVICE);
Modified: servicemix/smx4/nmr/trunk/jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/descriptor/DescriptorFactoryTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/descriptor/DescriptorFactoryTest.java?rev=747742&r1=747741&r2=747742&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/descriptor/DescriptorFactoryTest.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/deployer/src/test/java/org/apache/servicemix/jbi/deployer/descriptor/DescriptorFactoryTest.java Wed Feb 25 10:59:26 2009
@@ -22,17 +22,13 @@
import org.w3c.dom.DocumentFragment;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import org.junit.Test;
+import junit.framework.TestCase;
/**
* Test JBI descriptor parsing
*/
-public class DescriptorFactoryTest {
+public class DescriptorFactoryTest extends TestCase {
- @Test
public void testServiceUnit() throws Exception {
Descriptor root = DescriptorFactory.buildDescriptor(getClass().getResource("serviceUnit.xml"));
assertNotNull("Unable to parse descriptor", root);
@@ -43,7 +39,6 @@
assertEquals("consumes size", 1, consumes.length);
}
- @Test
public void testSharedLibrary() throws Exception {
Descriptor root = DescriptorFactory.buildDescriptor(getClass().getResource("sharedLibrary.xml"));
assertNotNull("Unable to parse descriptor", root);
@@ -54,7 +49,6 @@
assertEquals("getDescription", "This is a test shared library.", identification.getDescription());
}
- @Test
public void testServiceAssembly() throws Exception {
Descriptor root = DescriptorFactory.buildDescriptor(getClass().getResource("serviceAssembly.xml"));
assertNotNull("Unable to parse descriptor", root);
@@ -92,7 +86,6 @@
assertEquals("getConsumer().getServiceName() for 0", new QName("urn:csi", "csi-service"), connections[0].getConsumer().getServiceName());
}
- @Test
public void testComponent() throws Exception {
Descriptor root = DescriptorFactory.buildDescriptor(getClass().getResource("component.xml"));
assertNotNull("Unable to parse descriptor", root);
Modified: servicemix/smx4/nmr/trunk/jbi/runtime/src/test/java/org/apache/servicemix/jbi/runtime/IntegrationTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/runtime/src/test/java/org/apache/servicemix/jbi/runtime/IntegrationTest.java?rev=747742&r1=747741&r2=747742&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/runtime/src/test/java/org/apache/servicemix/jbi/runtime/IntegrationTest.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/runtime/src/test/java/org/apache/servicemix/jbi/runtime/IntegrationTest.java Wed Feb 25 10:59:26 2009
@@ -35,13 +35,10 @@
import org.apache.servicemix.nmr.api.Status;
import org.apache.servicemix.nmr.api.service.ServiceHelper;
import org.apache.servicemix.nmr.core.ServiceMix;
-import org.junit.Test;
+import junit.framework.TestCase;
-import static org.junit.Assert.assertEquals;
+public class IntegrationTest extends TestCase {
-public class IntegrationTest {
-
- @Test
public void testJbiComponent() throws Exception {
ServiceMix smx = new ServiceMix();
smx.init();
Modified: servicemix/smx4/nmr/trunk/jbi/runtime/src/test/java/org/apache/servicemix/jbi/runtime/impl/utils/DOMUtilTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/jbi/runtime/src/test/java/org/apache/servicemix/jbi/runtime/impl/utils/DOMUtilTest.java?rev=747742&r1=747741&r2=747742&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/jbi/runtime/src/test/java/org/apache/servicemix/jbi/runtime/impl/utils/DOMUtilTest.java (original)
+++ servicemix/smx4/nmr/trunk/jbi/runtime/src/test/java/org/apache/servicemix/jbi/runtime/impl/utils/DOMUtilTest.java Wed Feb 25 10:59:26 2009
@@ -23,19 +23,15 @@
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import org.junit.Test;
+import junit.framework.TestCase;
-public class DOMUtilTest {
+public class DOMUtilTest extends TestCase {
- @Test
public void testNewDoc() throws Exception {
Document doc = DOMUtil.newDocument();
assertNotNull(doc);
}
- @Test
public void testDoc() throws Exception {
String xml = "<root><hello>world</hello></root>";
Document doc = DOMUtil.parseDocument(new ByteArrayInputStream(xml.getBytes()));
Modified: servicemix/smx4/nmr/trunk/nmr/api/src/test/java/org/apache/servicemix/nmr/api/MEPCompatibilityTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/nmr/api/src/test/java/org/apache/servicemix/nmr/api/MEPCompatibilityTest.java?rev=747742&r1=747741&r2=747742&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/nmr/api/src/test/java/org/apache/servicemix/nmr/api/MEPCompatibilityTest.java (original)
+++ servicemix/smx4/nmr/trunk/nmr/api/src/test/java/org/apache/servicemix/nmr/api/MEPCompatibilityTest.java Wed Feb 25 10:59:26 2009
@@ -16,19 +16,16 @@
*/
package org.apache.servicemix.nmr.api;
-import static junit.framework.Assert.assertNotNull;
-
-import org.junit.Test;
+import junit.framework.TestCase;
/**
* MessageExchange pattern compatibility test
*
* @author Volodymyr Zhabiuk
*/
-public class MEPCompatibilityTest {
+public class MEPCompatibilityTest extends TestCase {
- @Test
- public void inOptOutCompatibilityTest() {
+ public void testInOptOutCompatibility() {
assertNotNull(Pattern.fromWsdlUri("http://www.w3.org/2004/08/wsdl/in-opt-out"));
}
Modified: servicemix/smx4/nmr/trunk/nmr/api/src/test/java/org/apache/servicemix/nmr/api/service/ServiceHelperTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/nmr/api/src/test/java/org/apache/servicemix/nmr/api/service/ServiceHelperTest.java?rev=747742&r1=747741&r2=747742&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/nmr/api/src/test/java/org/apache/servicemix/nmr/api/service/ServiceHelperTest.java (original)
+++ servicemix/smx4/nmr/trunk/nmr/api/src/test/java/org/apache/servicemix/nmr/api/service/ServiceHelperTest.java Wed Feb 25 10:59:26 2009
@@ -20,7 +20,6 @@
import org.apache.servicemix.nmr.api.Endpoint;
import org.apache.servicemix.nmr.api.Wire;
-import org.junit.Test;
import junit.framework.TestCase;
@@ -29,7 +28,6 @@
*/
public class ServiceHelperTest extends TestCase {
- @Test
public void testCreateWire() throws Exception {
Map<String, Object> from = ServiceHelper.createMap(Endpoint.SERVICE_NAME, "test:service",
Endpoint.ENDPOINT_NAME, "endpoint");
@@ -40,7 +38,6 @@
assertEquals(to, wire.getTo());
}
- @Test
public void testEqualsHandleNull() throws Exception {
Map<String, Object> map = ServiceHelper.createMap(Endpoint.SERVICE_NAME, "test:service",
Endpoint.ENDPOINT_NAME, "endpoint");
@@ -48,7 +45,6 @@
assertFalse("Should always return false when either one is null", ServiceHelper.equals(map, null));
}
- @Test
public void testEqualsSameSize() throws Exception {
Map<String, Object> first = ServiceHelper.createMap(Endpoint.SERVICE_NAME, "test:service",
Endpoint.ENDPOINT_NAME, "endpoint");
@@ -59,7 +55,6 @@
assertTrue("Maps with different sizes but the same values should match", ServiceHelper.matches(first, second));
}
- @Test
public void testEqualsSameKeys() throws Exception {
Map<String, Object> first = ServiceHelper.createMap(Endpoint.SERVICE_NAME, "test:service",
Endpoint.ENDPOINT_NAME, "endpoint");
@@ -69,7 +64,6 @@
assertFalse("Maps with different values shouldn't match", ServiceHelper.matches(first, second));
}
- @Test
public void testEqualsSameValues() throws Exception {
Map<String, Object> first = ServiceHelper.createMap(Endpoint.SERVICE_NAME, "test:service",
Endpoint.ENDPOINT_NAME, "endpoint");
@@ -78,7 +72,6 @@
assertFalse("Maps with different values for the same key shouldn't match", ServiceHelper.equals(first, second));
}
- @Test
public void testEquals() throws Exception {
Map<String, Object> first = ServiceHelper.createMap(Endpoint.SERVICE_NAME, "test:service",
Endpoint.ENDPOINT_NAME, "endpoint");
Modified: servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/EndpointRegistryImplTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/EndpointRegistryImplTest.java?rev=747742&r1=747741&r2=747742&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/EndpointRegistryImplTest.java (original)
+++ servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/EndpointRegistryImplTest.java Wed Feb 25 10:59:26 2009
@@ -31,17 +31,13 @@
import org.apache.servicemix.nmr.api.internal.InternalEndpoint;
import org.apache.servicemix.nmr.api.event.EndpointListener;
import org.apache.servicemix.nmr.api.service.ServiceHelper;
-import static org.junit.Assert.*;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.Ignore;
+import junit.framework.TestCase;
-public class EndpointRegistryImplTest {
+public class EndpointRegistryImplTest extends TestCase {
private NMR nmr;
private EndpointRegistry registry;
- @Before
public void setUp() {
ServiceMix smx = new ServiceMix();
smx.init();
@@ -51,7 +47,6 @@
assertSame(nmr, ((EndpointRegistryImpl) registry).getNmr());
}
- @Test
public void testRegistryConstructor() {
EndpointRegistryImpl reg = new EndpointRegistryImpl();
try {
@@ -64,7 +59,6 @@
reg.init();
}
- @Test
public void testRegisterUnregister() throws Exception {
Endpoint endpoint = new DummyEndpoint();
Reference ref = registry.lookup(ServiceHelper.createMap(Endpoint.NAME, "id"));
@@ -81,7 +75,6 @@
assertFalse(r.choose().iterator().hasNext());
}
- @Test
public void testLdapFilter() throws Exception {
System.setProperty("org.osgi.vendor.framework", "org.apache.servicemix.nmr.core");
@@ -100,7 +93,6 @@
assertFalse(r.choose().iterator().hasNext());
}
- @Test
public void testEndpointListener() throws Exception {
final CountDownLatch regLatch = new CountDownLatch(1);
final CountDownLatch unregLatch = new CountDownLatch(1);
@@ -119,7 +111,6 @@
assertTrue(unregLatch.await(1, TimeUnit.SECONDS));
}
- @Test
public void testHandleWiring() throws Exception {
final Map<String, Object> from = ServiceHelper.createMap(Endpoint.SERVICE_NAME, "test:wired-service",
Endpoint.ENDPOINT_NAME, "endpoint");
@@ -141,7 +132,6 @@
assertEquals(endpoint, ((InternalEndpoint) result.get(0)).getEndpoint());
}
- @Test
public void testEndpointWiringOnLookup() throws Exception {
final Map<String, Object> from = ServiceHelper.createMap(Endpoint.SERVICE_NAME, "test:wired-service",
Endpoint.ENDPOINT_NAME, "endpoint");
Modified: servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/ExchangeImplTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/ExchangeImplTest.java?rev=747742&r1=747741&r2=747742&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/ExchangeImplTest.java (original)
+++ servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/ExchangeImplTest.java Wed Feb 25 10:59:26 2009
@@ -31,18 +31,11 @@
import org.apache.servicemix.nmr.api.Pattern;
import org.apache.servicemix.nmr.api.Status;
import org.apache.servicemix.nmr.api.Type;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import org.junit.Test;
+import junit.framework.TestCase;
-public class ExchangeImplTest {
+public class ExchangeImplTest extends TestCase {
- @Test
public void testWrite() throws Exception {
Exchange e = new ExchangeImpl(Pattern.InOnly);
e.setOperation(new QName("op"));
@@ -69,7 +62,6 @@
assertNotNull(cpy.getIn().getAttachment("id"));
}
- @Test
public void testConvertWithoutCamel() throws Exception {
final URLClassLoader c = (URLClassLoader) getClass().getClassLoader();
ClassLoader cl = new URLClassLoader(c.getURLs(), null) {
@@ -89,7 +81,6 @@
assertNull(e.getProperty("key", byte[].class));
}
- @Test
public void testCopy() {
Exchange e = new ExchangeImpl(Pattern.InOut);
Exchange cpy = e.copy();
@@ -107,7 +98,6 @@
assertNotNull(cpy.getIn(false));
}
- @Test
public void testMessages() {
Exchange e = new ExchangeImpl(Pattern.InOut);
assertNull(e.getMessage(Type.In, false));
@@ -127,7 +117,6 @@
e.setMessage(Type.Fault, null);
}
- @Test
public void testError() {
Exchange e = new ExchangeImpl(Pattern.InOnly);
assertNull(e.getError());
@@ -137,7 +126,6 @@
assertEquals(Status.Error, e.getStatus());
}
- @Test
public void testProperties() {
Exchange e = new ExchangeImpl(Pattern.InOnly);
assertNotNull(e.getProperties());
@@ -169,7 +157,6 @@
assertNotNull(e.getProperty("name"));
}
- @Test
public void testDisplay() {
Exchange e = new ExchangeImpl(Pattern.InOut);
e.toString();
@@ -181,7 +168,6 @@
e.toString();
}
- @Test
public void testLocks() {
ExchangeImpl e = new ExchangeImpl(Pattern.InOut);
assertNull(e.getConsumerLock(false));
@@ -190,7 +176,6 @@
assertNotNull(e.getProviderLock(true));
}
- @Test
public void testInOnly() {
Exchange e = new ExchangeImpl(Pattern.InOnly);
assertNotNull(e.getIn());
@@ -198,7 +183,6 @@
assertNull(e.getFault());
}
- @Test
public void testRobustInOnly() {
Exchange e = new ExchangeImpl(Pattern.RobustInOnly);
assertNotNull(e.getIn());
@@ -206,7 +190,6 @@
assertNotNull(e.getFault());
}
- @Test
public void testInOut() {
Exchange e = new ExchangeImpl(Pattern.InOut);
assertNotNull(e.getIn());
@@ -214,7 +197,6 @@
assertNotNull(e.getFault());
}
- @Test
public void testInOptionalOut() {
Exchange e = new ExchangeImpl(Pattern.InOptionalOut);
assertNotNull(e.getIn());
Modified: servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/IntegrationTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/IntegrationTest.java?rev=747742&r1=747741&r2=747742&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/IntegrationTest.java (original)
+++ servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/IntegrationTest.java Wed Feb 25 10:59:26 2009
@@ -20,26 +20,21 @@
import org.apache.servicemix.nmr.api.*;
import org.apache.servicemix.nmr.api.service.ServiceHelper;
-import org.apache.servicemix.nmr.core.ServiceMix;
-import static org.junit.Assert.*;
-import org.junit.Before;
-import org.junit.Test;
+import junit.framework.TestCase;
/**
* Integration test
*/
-public class IntegrationTest {
+public class IntegrationTest extends TestCase {
private NMR nmr;
- @Before
public void setUp() {
ServiceMix smx = new ServiceMix();
smx.init();
nmr = smx;
}
- @Test
public void testSendExchangeToEndpointUsingClient() throws Exception {
MyEndpoint endpoint = new MyEndpoint();
nmr.getEndpointRegistry().register(endpoint, ServiceHelper.createMap(Endpoint.NAME, "id"));
@@ -53,7 +48,6 @@
assertEquals(Status.Done, e.getStatus());
}
- @Test
public void testSendExchangeToWiredEndpointUsingClient() throws Exception {
MyEndpoint endpoint = new MyEndpoint();
Map<String, Object> target = ServiceHelper.createMap(Endpoint.NAME, "id");
Modified: servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/MessageImplTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/MessageImplTest.java?rev=747742&r1=747741&r2=747742&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/MessageImplTest.java (original)
+++ servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/MessageImplTest.java Wed Feb 25 10:59:26 2009
@@ -27,16 +27,10 @@
import org.apache.servicemix.nmr.api.Exchange;
import org.apache.servicemix.nmr.api.Message;
import org.apache.servicemix.nmr.api.Pattern;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import org.junit.Test;
+import junit.framework.TestCase;
-public class MessageImplTest {
+public class MessageImplTest extends TestCase {
- @Test
public void testBody() {
Message msg = new MessageImpl();
assertNull(msg.getBody());
@@ -48,7 +42,6 @@
assertTrue(msg.getBody() instanceof byte[]);
}
- @Test
public void testConvertWithoutCamel() throws Exception {
final URLClassLoader c = (URLClassLoader) getClass().getClassLoader();
ClassLoader cl = new URLClassLoader(c.getURLs(), null) {
@@ -68,7 +61,6 @@
assertNull(msg.getBody(byte[].class));
}
- @Test
public void testHeaders() {
Message msg = new MessageImpl();
assertNotNull(msg.getHeaders());
@@ -99,7 +91,6 @@
assertNotNull(msg.getHeader("name"));
}
- @Test
public void testContentType() {
Message msg = new MessageImpl();
assertNull(msg.getContentType());
@@ -107,7 +98,6 @@
assertEquals("type", msg.getContentType());
}
- @Test
public void testContentEncoding() {
Message msg = new MessageImpl();
assertNull(msg.getContentEncoding());
@@ -115,7 +105,6 @@
assertEquals("enc", msg.getContentEncoding());
}
- @Test
public void testAttachments() {
Message msg = new MessageImpl();
assertNull(msg.getAttachment("id"));
@@ -129,7 +118,6 @@
assertTrue(msg.getAttachments().isEmpty());
}
- @Test
public void testCopy() {
Message msg = new MessageImpl();
Message cpy = msg.copy();
@@ -144,7 +132,6 @@
assertNotNull(cpy.getAttachment("id"));
}
- @Test
public void testWrite() throws Exception {
Message msg = new MessageImpl();
msg.setHeader("header", "value");
@@ -160,7 +147,6 @@
assertNotNull(cpy.getAttachment("id"));
}
- @Test
public void testDisplay() {
Message msg = new MessageImpl();
msg.toString();
Modified: servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/ServiceMixTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/ServiceMixTest.java?rev=747742&r1=747741&r2=747742&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/ServiceMixTest.java (original)
+++ servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/ServiceMixTest.java Wed Feb 25 10:59:26 2009
@@ -17,15 +17,13 @@
package org.apache.servicemix.nmr.core;
import org.apache.servicemix.nmr.api.WireRegistry;
-import org.junit.Test;
-import static org.junit.Assert.*;
+import junit.framework.TestCase;
/**
* Test cases for {@link ServiceMix}
*/
-public class ServiceMixTest {
+public class ServiceMixTest extends TestCase {
- @Test
public void testInit() {
ServiceMix servicemix = new ServiceMix();
servicemix.init();
@@ -35,7 +33,6 @@
assertNotNull(servicemix.getWireRegistry());
}
- @Test
public void testSetWireRegistry() {
ServiceMix servicemix = new ServiceMix();
WireRegistry registry = new WireRegistryImpl();
Modified: servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/util/FilterIteratorTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/util/FilterIteratorTest.java?rev=747742&r1=747741&r2=747742&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/util/FilterIteratorTest.java (original)
+++ servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/util/FilterIteratorTest.java Wed Feb 25 10:59:26 2009
@@ -20,13 +20,10 @@
import java.util.List;
import java.util.NoSuchElementException;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import org.junit.Test;
+import junit.framework.TestCase;
-public class FilterIteratorTest {
+public class FilterIteratorTest extends TestCase {
- @Test
public void test() {
List<Integer> l = Arrays.asList(new Integer[] { 1, 2, 3 });
FilterIterator<Integer> it = new FilterIterator<Integer>(l.iterator(), new Filter<Integer>() {
Modified: servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/util/MapToDictionaryTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/util/MapToDictionaryTest.java?rev=747742&r1=747741&r2=747742&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/util/MapToDictionaryTest.java (original)
+++ servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/util/MapToDictionaryTest.java Wed Feb 25 10:59:26 2009
@@ -18,19 +18,13 @@
import java.util.Dictionary;
import java.util.Enumeration;
-import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import org.junit.Test;
+import junit.framework.TestCase;
-public class MapToDictionaryTest {
+public class MapToDictionaryTest extends TestCase {
- @Test
public void testConstructorWithNullArgument() {
try {
new MapToDictionary(null);
@@ -44,8 +38,7 @@
}
}
- @Test
- public void test() {
+ public void testMap() {
Map<Integer, Boolean> map = new TreeMap<Integer, Boolean>();
map.put(3, true);
map.put(5, false);
Modified: servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/util/StringSourceTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/util/StringSourceTest.java?rev=747742&r1=747741&r2=747742&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/util/StringSourceTest.java (original)
+++ servicemix/smx4/nmr/trunk/nmr/core/src/test/java/org/apache/servicemix/nmr/core/util/StringSourceTest.java Wed Feb 25 10:59:26 2009
@@ -23,15 +23,10 @@
import javax.xml.transform.Source;
-import org.junit.Test;
+import junit.framework.TestCase;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+public class StringSourceTest extends TestCase {
-public class StringSourceTest {
-
- @Test
public void testSerialize() throws Exception {
Source src = new StringSource("<hello/>");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Modified: servicemix/smx4/nmr/trunk/pom.xml
URL: http://svn.apache.org/viewvc/servicemix/smx4/nmr/trunk/pom.xml?rev=747742&r1=747741&r2=747742&view=diff
==============================================================================
--- servicemix/smx4/nmr/trunk/pom.xml (original)
+++ servicemix/smx4/nmr/trunk/pom.xml Wed Feb 25 10:59:26 2009
@@ -175,12 +175,6 @@
<dependencies>
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.4</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.apache.servicemix.bundles</groupId>
<artifactId>org.apache.servicemix.bundles.junit</artifactId>
<scope>test</scope>
@@ -231,11 +225,6 @@
<version>${log4j.version}</version>
</dependency>
<dependency>
- <groupId>jline</groupId>
- <artifactId>jline</artifactId>
- <version>${jline.version}</version>
- </dependency>
- <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${commons.logging.version}</version>
@@ -406,11 +395,21 @@
<artifactId>org.apache.felix.framework</artifactId>
<version>${felix.framework.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <version>${felix.compendium.version}</version>
- </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.compendium</artifactId>
+ <version>${felix.compendium.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.foundation</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>javax.servlet</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.apache.servicemix.specs</groupId>
<artifactId>org.apache.servicemix.specs.activation-api-1.1</artifactId>