Author: midon
Date: Fri Oct 10 14:55:45 2008
New Revision: 703585
URL: http://svn.apache.org/viewvc?rev=703585&view=rev
Log:
ODE-387: migrate to TestNG
Modified:
ode/trunk/Rakefile
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/Axis2TestBase.java
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/EndpointConfigurationTest.java
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/MessageStructureTest.java
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/TestSimpleScenario.java
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/TestSimpleScenarioV1.java
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/XSDReferencesDeployTest.java
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/DeploymentTest.java
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTest.java
Modified: ode/trunk/Rakefile
URL:
http://svn.apache.org/viewvc/ode/trunk/Rakefile?rev=703585&r1=703584&r2=703585&view=diff
==============================================================================
--- ode/trunk/Rakefile (original)
+++ ode/trunk/Rakefile Fri Oct 10 14:55:45 2008
@@ -242,6 +242,7 @@
end
end
+ test.using :testng
test.with(projects("tools"), libs, AXIS2_ALL, HTTPCORE, JAVAX.servlet,
Buildr::Jetty::REQUIRES, file(_("target/test"))).using(:fork => :each)
test.setup task(:prepare_webapp) do |task|
cp_r _("src/main/webapp"), _("target/test")
Modified:
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/Axis2TestBase.java
URL:
http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/Axis2TestBase.java?rev=703585&r1=703584&r2=703585&view=diff
==============================================================================
--- ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/Axis2TestBase.java
(original)
+++ ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/Axis2TestBase.java
Fri Oct 10 14:55:45 2008
@@ -1,38 +1,39 @@
package org.apache.ode.axis2;
-import junit.framework.TestCase;
import org.apache.axis2.AxisFault;
-import org.apache.axis2.description.WSDL11ToAxisServiceBuilder;
-import org.apache.axis2.description.AxisService;
+import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.Parameter;
-import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.description.WSDL11ToAxisServiceBuilder;
import org.apache.axis2.engine.AxisServer;
import org.apache.axis2.engine.MessageReceiver;
-import org.apache.ode.tools.sendsoap.cline.HttpSoapSender;
+import org.apache.ode.axis2.hooks.ODEAxisService;
import org.apache.ode.axis2.util.Axis2UriResolver;
import org.apache.ode.axis2.util.Axis2WSDLLocator;
-import org.apache.ode.axis2.hooks.ODEAxisService;
+import org.apache.ode.tools.sendsoap.cline.HttpSoapSender;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import javax.servlet.ServletException;
import javax.wsdl.WSDLException;
import javax.xml.namespace.QName;
-import java.io.*;
-import java.net.URL;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
-import java.util.Date;
-import java.util.Iterator;
+import java.net.URL;
import java.util.Collection;
-import java.util.Random;
-
-import org.junit.*;
+import java.util.Iterator;
/**
* @author Matthieu Riou <[EMAIL PROTECTED]>
*/
[EMAIL PROTECTED]
-public abstract class Axis2TestBase extends TestCase {
+public abstract class Axis2TestBase {
private static final int DEFAULT_TEST_PORT = 8888;
@@ -40,7 +41,6 @@
// Provide standard constructors to accommodate creation of test suites
public Axis2TestBase(String name) {
- super(name);
}
public Axis2TestBase() {
@@ -57,14 +57,14 @@
server.stop();
}
+ @BeforeMethod
protected void setUp() throws Exception {
- super.setUp();
startServer();
}
+ @AfterMethod
protected void tearDown() throws Exception {
stopServer();
- super.tearDown();
}
protected class ODEAxis2Server extends AxisServer {
Modified:
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/EndpointConfigurationTest.java
URL:
http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/EndpointConfigurationTest.java?rev=703585&r1=703584&r2=703585&view=diff
==============================================================================
---
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/EndpointConfigurationTest.java
(original)
+++
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/EndpointConfigurationTest.java
Fri Oct 10 14:55:45 2008
@@ -19,16 +19,14 @@
package org.apache.ode.axis2;
-import junit.framework.TestCase;
-import org.apache.ode.axis2.JettyWrapper;
import org.mortbay.jetty.handler.ContextHandler;
import org.mortbay.jetty.handler.HandlerList;
import org.mortbay.jetty.security.Constraint;
import org.mortbay.jetty.security.ConstraintMapping;
-import org.mortbay.jetty.security.SecurityHandler;
import org.mortbay.jetty.security.HashUserRealm;
-
-import java.util.concurrent.CountDownLatch;
+import org.mortbay.jetty.security.SecurityHandler;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
/**
*
@@ -37,6 +35,7 @@
public class EndpointConfigurationTest extends Axis2TestBase {
+ @Test
public void testEndpointProperties() throws Exception {
executeProcess();
}
@@ -69,6 +68,7 @@
* Redo the exact same test but with Basic Authentication activated on the
external service
* @throws Exception
*/
+ @Test
public void testHttpAuthentication() throws Exception {
ContextHandler securedEchoContext;
{
Modified:
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/MessageStructureTest.java
URL:
http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/MessageStructureTest.java?rev=703585&r1=703584&r2=703585&view=diff
==============================================================================
---
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/MessageStructureTest.java
(original)
+++
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/MessageStructureTest.java
Fri Oct 10 14:55:45 2008
@@ -1,10 +1,13 @@
package org.apache.ode.axis2;
import org.apache.ode.utils.DOMUtils;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
import org.w3c.dom.Element;
public class MessageStructureTest extends Axis2TestBase {
+ @Test
public void testAttrWithNsValue() throws Exception {
String bundleName = "TestAttributeNamespaces";
// deploy the required service
Modified:
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
URL:
http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java?rev=703585&r1=703584&r2=703585&view=diff
==============================================================================
---
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
(original)
+++
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
Fri Oct 10 14:55:45 2008
@@ -1,5 +1,8 @@
package org.apache.ode.axis2;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
+
/**
* Tests that a fault thrown by a called service can be caught and is properly
* structured so that an assign on a fault sub-element will succeed.
@@ -11,6 +14,7 @@
super(name);
}
+ @Test
public void testSimpleFaultCatch() throws Exception {
String bundleName = "TestStructuredFault";
// deploy the required service
Modified:
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java
URL:
http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java?rev=703585&r1=703584&r2=703585&view=diff
==============================================================================
--- ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java
(original)
+++ ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java
Fri Oct 10 14:55:45 2008
@@ -1,14 +1,21 @@
package org.apache.ode.axis2;
-import org.apache.axis2.engine.MessageReceiver;
-import org.apache.axis2.engine.AxisEngine;
-import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.AxisFault;
-import org.apache.axis2.util.Utils;
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
-import org.apache.axiom.soap.*;
+import org.apache.axiom.soap.SOAPBody;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPFactory;
+import org.apache.axiom.soap.SOAPHeader;
+import org.apache.axiom.soap.SOAPHeaderBlock;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.engine.AxisEngine;
+import org.apache.axis2.engine.MessageReceiver;
+import org.apache.axis2.util.Utils;
import org.apache.ode.utils.DOMUtils;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
import org.w3c.dom.Element;
import javax.xml.namespace.QName;
@@ -24,6 +31,7 @@
super(name);
}
+ @Test
public void testSimplePassing() throws Exception {
server.deployService("TestSoapHeader", "dummy-service.wsdl",
new QName("http://axis2.ode.apache.org", "DummyService"),
"DummyServiceSOAP11port_http",
Modified:
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/TestSimpleScenario.java
URL:
http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/TestSimpleScenario.java?rev=703585&r1=703584&r2=703585&view=diff
==============================================================================
---
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/TestSimpleScenario.java
(original)
+++
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/TestSimpleScenario.java
Fri Oct 10 14:55:45 2008
@@ -1,9 +1,11 @@
package org.apache.ode.axis2;
-import org.apache.ode.bpel.compiler.BpelCompilerFactory;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
public class TestSimpleScenario extends Axis2TestBase {
+ @Test
public void testHelloWorld2() throws Exception {
String bundleName = "TestHelloWorld2";
if(!server._ode.getProcessStore().getPackages().contains(bundleName))
server.deployProcess(bundleName);
@@ -18,6 +20,7 @@
}
+ @Test
public void testDynPartner() throws Exception {
String bundleName = "TestDynPartner";
if(!server._ode.getProcessStore().getPackages().contains(bundleName))
server.deployProcess(bundleName);
@@ -33,6 +36,7 @@
}
+ @Test
public void testMagicSession() throws Exception {
String bundleName = "TestMagicSession";
if(!server._ode.getProcessStore().getPackages().contains(bundleName))
server.deployProcess(bundleName);
Modified:
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/TestSimpleScenarioV1.java
URL:
http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/TestSimpleScenarioV1.java?rev=703585&r1=703584&r2=703585&view=diff
==============================================================================
---
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/TestSimpleScenarioV1.java
(original)
+++
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/TestSimpleScenarioV1.java
Fri Oct 10 14:55:45 2008
@@ -1,9 +1,12 @@
package org.apache.ode.axis2;
import org.apache.ode.bpel.compiler.BpelCompilerFactory;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
public class TestSimpleScenarioV1 extends Axis2TestBase {
+ @Test
public void testHelloWorld2() throws Exception {
String bundleName = "TestHelloWorld2";
BpelCompilerFactory.forceVersion = 1;
@@ -19,6 +22,7 @@
}
+ @Test
public void testDynPartner() throws Exception {
String bundleName = "TestDynPartner";
BpelCompilerFactory.forceVersion = 1;
@@ -35,6 +39,7 @@
}
+ @Test
public void testMagicSession() throws Exception {
String bundleName = "TestMagicSession";
BpelCompilerFactory.forceVersion = 1;
@@ -50,4 +55,4 @@
}
}
-}
\ No newline at end of file
+}
Modified:
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/XSDReferencesDeployTest.java
URL:
http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/XSDReferencesDeployTest.java?rev=703585&r1=703584&r2=703585&view=diff
==============================================================================
---
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/XSDReferencesDeployTest.java
(original)
+++
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/XSDReferencesDeployTest.java
Fri Oct 10 14:55:45 2008
@@ -1,10 +1,13 @@
package org.apache.ode.axis2;
+import org.testng.annotations.Test;
+
/**
* @author Matthieu Riou <[EMAIL PROTECTED]>
*/
public class XSDReferencesDeployTest extends Axis2TestBase {
+ @Test
public void testSimpleFaultCatch() throws Exception {
server.deployService(DummyService.class.getCanonicalName());
// If we have a bug, this will throw an exception, no need to assert
Modified:
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java
URL:
http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java?rev=703585&r1=703584&r2=703585&view=diff
==============================================================================
---
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java
(original)
+++
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java
Fri Oct 10 14:55:45 2008
@@ -1,9 +1,13 @@
package org.apache.ode.axis2.httpbinding;
-import org.apache.ode.axis2.Axis2TestBase;
-import org.apache.ode.axis2.JettyWrapper;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.ode.axis2.Axis2TestBase;
+import org.apache.ode.axis2.JettyWrapper;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
import java.util.concurrent.CountDownLatch;
@@ -29,6 +33,7 @@
super(name);
}
+ @BeforeMethod
protected void setUp() throws Exception {
super.setUp();
final CountDownLatch latch = new CountDownLatch(1);
@@ -47,11 +52,13 @@
latch.await();
}
+ @AfterMethod
protected void tearDown() throws Exception {
jettyWrapper.stop();
super.tearDown();
}
+ @Test
public void testHttpBinding() throws Exception {
String bundleName = "TestHttpBinding";
// deploy the required service
@@ -69,22 +76,26 @@
}
}
+ @Test
public void testHttpBindingExt_GET() throws Exception {
String bundleName = "TestHttpBindingExt_GET";
executeBundle(bundleName);
}
+ @Test
public void testHttpBindingExt_DELETE() throws Exception {
String bundleName = "TestHttpBindingExt_DELETE";
executeBundle(bundleName);
}
+ @Test
public void testHttpBindingExt_POST() throws Exception {
String bundleName = "TestHttpBindingExt_POST";
executeBundle(bundleName);
}
+ @Test
public void testHttpBindingExt_PUT() throws Exception {
String bundleName = "TestHttpBindingExt_PUT";
executeBundle(bundleName);
Modified:
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/DeploymentTest.java
URL:
http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/DeploymentTest.java?rev=703585&r1=703584&r2=703585&view=diff
==============================================================================
---
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/DeploymentTest.java
(original)
+++
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/DeploymentTest.java
Fri Oct 10 14:55:45 2008
@@ -19,12 +19,20 @@
package org.apache.ode.axis2.management;
-import org.apache.axiom.om.*;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMText;
import org.apache.axiom.om.util.Base64;
import org.apache.axis2.AxisFault;
-import org.apache.ode.axis2.service.ServiceClientUtil;
import org.apache.ode.axis2.Axis2TestBase;
+import org.apache.ode.axis2.service.ServiceClientUtil;
import org.apache.ode.utils.Namespaces;
+import static org.testng.AssertJUnit.*;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
import javax.xml.namespace.QName;
import java.io.ByteArrayOutputStream;
@@ -40,6 +48,7 @@
private ArrayList<QName> _deployed = new ArrayList<QName>();
private String _package;
+ @Test
public void testDeployUndeploy() throws Exception {
// Setup and tear down are doing ost of the job here, just checking in
the middle
@@ -74,12 +83,14 @@
assertEquals(_deployed.get(1).toString(), pid.getText());
}
+ @Test
public void testListDeployedPackages() throws Exception {
OMElement root = _client.buildMessage("listDeployedPackages", new
String[] {}, new String[] {});
OMElement result = sendToDeployment(root);
assertTrue(result.toString().indexOf(_package) > 0);
}
+ @Test
public void testListProcesses() throws Exception {
OMElement root = _client.buildMessage("listProcesses", new String[]
{"packagesNames"},
new String[] {_package});
@@ -90,6 +101,7 @@
assertTrue(result.toString().indexOf("DynPartnerResponder")>=0);
}
+ @Test
public void testGetProcessPackage() throws Exception {
OMElement root = _client.buildMessage("getProcessPackage", new
String[] {"processId"},
new Object[] { _deployed.get(0) } );
@@ -102,6 +114,7 @@
assertEquals(_package, result2.getText());
}
+ @Test
public void testMultipleDeployUndeployVersion() throws Exception {
ArrayList<String> deployed = new ArrayList<String>();
// Testing that versions are monotonically increased
@@ -129,6 +142,7 @@
}
}
+ @BeforeMethod
protected void setUp() throws Exception {
super.setUp();
// Create a factory
@@ -143,6 +157,7 @@
Thread.sleep(1000);
}
+ @AfterMethod
protected void tearDown() throws Exception {
undeploy(_package);
super.tearDown();
@@ -218,4 +233,4 @@
return _client.send(msg,
"http://localhost:8888/processes/DeploymentService");
}
-}
\ No newline at end of file
+}
Modified:
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java
URL:
http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java?rev=703585&r1=703584&r2=703585&view=diff
==============================================================================
---
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java
(original)
+++
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/InstanceManagementTest.java
Fri Oct 10 14:55:45 2008
@@ -19,13 +19,20 @@
package org.apache.ode.axis2.management;
-import org.apache.axiom.om.*;
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axiom.om.OMText;
import org.apache.axiom.om.util.Base64;
import org.apache.axis2.AxisFault;
-import org.apache.ode.axis2.service.ServiceClientUtil;
import org.apache.ode.axis2.Axis2TestBase;
+import org.apache.ode.axis2.service.ServiceClientUtil;
import org.apache.ode.tools.sendsoap.cline.HttpSoapSender;
import org.apache.ode.utils.Namespaces;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
import javax.xml.namespace.QName;
import java.io.ByteArrayOutputStream;
@@ -43,6 +50,7 @@
private ServiceClientUtil _client;
private String _deployedName;
+ @Test
public void testListInstances() throws Exception {
OMElement listRoot = _client.buildMessage("listInstances", new
String[] {"filter", "order", "limit"},
new String[] {"name=DynPartnerMain", "", "10"});
@@ -61,6 +69,7 @@
assert(result.toString().split("instance-info").length == 5);
}
+ @Test
public void testListAllInstances() throws Exception {
OMElement root = _client.buildMessage("listAllInstancesWithLimit", new
String[] {"limit"}, new String[] {"1"});
OMElement result = sendToIM(root);
@@ -71,6 +80,7 @@
result.toString().indexOf("DynPartnerResponder") >= 0);
}
+ @Test
public void testInstanceSummaryListProcess() throws Exception {
OMElement listRoot = _client.buildMessage("listProcesses", new
String[] {"filter", "orderKeys"},
new String[] {"name=DynPartnerMain", ""});
@@ -87,6 +97,7 @@
assert(count == 1);
}
+ @Test
public void testGetInstanceInfo() throws Exception {
OMElement root = _client.buildMessage("listAllInstances", new String[]
{}, new String[] {});
OMElement result = sendToIM(root);
@@ -97,6 +108,7 @@
assert(result.toString().split("instance-info").length == 3);
}
+ @Test
public void testGetInstanceInfoFault() throws Exception {
// Hopefully this id won't exist
OMElement root = _client.buildMessage("getInstanceInfo", new String[]
{"iid"}, new String[] {"65431"});
@@ -108,6 +120,7 @@
}
}
+ @Test
public void testGetScopeInfo() throws Exception {
OMElement root = _client.buildMessage("listAllInstances", new String[]
{}, new String[] {});
OMElement result = sendToIM(root);
@@ -121,6 +134,7 @@
assert(result.toString().indexOf("activity-info") >= 0);
}
+ @Test
public void testGetVariableInfo() throws Exception {
OMElement root = _client.buildMessage("listInstances", new String[]
{"filter", "order", "limit"},
new String[] {"name=DynPartnerMain", "", "10"});
@@ -150,6 +164,7 @@
// assert(result.toString().split("element").length > 10);
// }
+ @Test
public void testDeleteInstances() throws Exception {
OMElement root = _client.buildMessage("listAllInstancesWithLimit", new
String[] {"limit"}, new String[] {"1"});
OMElement result = sendToIM(root);
@@ -158,6 +173,7 @@
_client.buildMessage("delete", new String[] {"piid"}, new String[]
{iid});
}
+ @BeforeMethod
protected void setUp() throws Exception {
super.setUp();
@@ -198,6 +214,7 @@
Thread.sleep(1000);
}
+ @AfterMethod
protected void tearDown() throws Exception {
// Prepare undeploy message
OMNamespace depns = _factory.createOMNamespace(Namespaces.ODE_PMAPI,
"deployapi");
@@ -229,8 +246,4 @@
return _client.send(msg,
"http://localhost:8888/processes/DeploymentService");
}
- public static void main(String[] args) {
- junit.textui.TestRunner.run(new InstanceManagementTest());
- }
-
}
Modified:
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTest.java
URL:
http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTest.java?rev=703585&r1=703584&r2=703585&view=diff
==============================================================================
---
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTest.java
(original)
+++
ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTest.java
Fri Oct 10 14:55:45 2008
@@ -1,7 +1,8 @@
package org.apache.ode.axis2.management;
import org.apache.ode.axis2.Axis2TestBase;
-import org.apache.ode.axis2.DummyService;
+import static org.testng.AssertJUnit.assertTrue;
+import org.testng.annotations.Test;
import javax.xml.namespace.QName;
@@ -10,6 +11,7 @@
*/
public class RetireTest extends Axis2TestBase {
+ @Test
public void testRetiredInstance() throws Exception {
String bundleName = "TestInstanceRetire";
System.out.println("=> " +
server.getODEServer().getProcessStore().getPackages());