You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gd...@apache.org on 2007/12/31 21:28:12 UTC
svn commit: r607774 -
/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/DeploymentTotalTest.java
Author: gdaniels
Date: Mon Dec 31 12:28:12 2007
New Revision: 607774
URL: http://svn.apache.org/viewvc?rev=607774&view=rev
Log:
Confirm that the handler actually gets into the new phase.
Modified:
webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/DeploymentTotalTest.java
Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/DeploymentTotalTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/DeploymentTotalTest.java?rev=607774&r1=607773&r2=607774&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/DeploymentTotalTest.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/DeploymentTotalTest.java Mon Dec 31 12:28:12 2007
@@ -22,10 +22,12 @@
import junit.framework.TestCase;
import org.apache.axis2.AbstractTestCase;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.registry.Handler3;
import org.apache.axis2.context.ConfigurationContextFactory;
import org.apache.axis2.description.Parameter;
import org.apache.axis2.engine.AxisConfiguration;
import org.apache.axis2.engine.Phase;
+import org.apache.axis2.engine.Handler;
import javax.xml.stream.XMLStreamException;
import java.util.ArrayList;
@@ -38,6 +40,7 @@
axisConfig = ConfigurationContextFactory
.createConfigurationContextFromFileSystem(filename, filename + "/axis2.xml")
.getAxisConfiguration();
+ axisConfig.engageModule("module1");
// OK, no exceptions. Now make sure we read the correct file...
}
@@ -49,14 +52,15 @@
public void testDynamicPhase() {
ArrayList inFlow = axisConfig.getInFlowPhases();
- int index = 0;
for (int i = 0; i < inFlow.size(); i++) {
Phase phase = (Phase) inFlow.get(i);
if (phase.getName().equals("NewPhase")) {
- index = i;
+ assertEquals("Wrong index for NewPhase!", 3, i);
+ assertEquals("Wrong # of handlers in NewPhase", 1, phase.getHandlerCount());
+ Handler h6 = (Handler)phase.getHandlers().get(0);
+ assertTrue("Wrong type for handler", h6 instanceof Handler3);
}
}
- assertEquals("Wrong index for NewPhase!", 3, index);
inFlow = axisConfig.getInFaultFlowPhases();
boolean found = false;
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org