[wsas-java-dev] svn commit r225 - in wsas/java/trunk/modules: admin core core/src/org/wso2/wsas core/src/org/wso2/wsas/transport/jetty core/test/org/wso2/wsas integration integration/test/org/wso2/wsas/sample/commodityquote

svn at wso2.com svn at wso2.com
Thu Dec 14 04:02:45 PST 2006


Author: saminda
Date: Thu Dec 14 04:02:45 2006
New Revision: 225

Added:
   wsas/java/trunk/modules/integration/test/org/wso2/wsas/sample/commodityquote/CommodityQuoteCallbackHandlerTest.java
Modified:
   wsas/java/trunk/modules/admin/pom.xml
   wsas/java/trunk/modules/core/pom.xml
   wsas/java/trunk/modules/core/src/org/wso2/wsas/Main.java
   wsas/java/trunk/modules/core/src/org/wso2/wsas/transport/jetty/JettyServer.java
   wsas/java/trunk/modules/core/test/org/wso2/wsas/JettyServerTest.java
   wsas/java/trunk/modules/integration/pom.xml
   wsas/java/trunk/modules/integration/test/org/wso2/wsas/sample/commodityquote/CommodityQuoteServiceIntegrationTest.java
Log:
1. All the test cases will pass with mvn install
2. Updated Main.java/JettyserverTest/JettyServer to cope with both Maven and Maven2 builds
3. Build will be sucessfull in both Maven1 and Maven2 and this time around, Maven2 is super fast :) 
4. TODO building the distribution with assembly plugin  


Modified: wsas/java/trunk/modules/admin/pom.xml
==============================================================================
--- wsas/java/trunk/modules/admin/pom.xml	(original)
+++ wsas/java/trunk/modules/admin/pom.xml	Thu Dec 14 04:02:45 2006
@@ -314,6 +314,29 @@
             <groupId>org.springframework</groupId>
             <artifactId>spring</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>addressing</artifactId>
+            <type>mar</type>
+        </dependency>
+
+        <!-- System dependency -->
+        <dependency>
+            <groupId>sun.jdk</groupId>
+            <artifactId>tools</artifactId>
+            <version>${java.version}</version>
+            <scope>system</scope>
+            <systemPath>${java.home}/../lib/tools.jar</systemPath>
+        </dependency>
+
+        <dependency>
+            <groupId>org.wso2.wsas</groupId>
+            <artifactId>wso2wsas-core</artifactId>
+            <version>${pom.version}</version>
+            <type>test-jar</type>
+        </dependency>
+
     </dependencies>
 
     <build>
@@ -340,6 +363,56 @@
             </plugin>
 
             <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <inherited>true</inherited>
+                <configuration>
+                    <testFailureIgnore>false</testFailureIgnore>
+                    <skip>false</skip>
+                    <excludes>
+                        <exclude>**/*Abstract*.java</exclude>
+                    </excludes>
+                    <includes>
+                        <include>**/*Test.java</include>
+                    </includes>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.0-alpha-1-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <id>copy</id>
+                        <phase>generate-test-resources</phase>
+                        <goals>
+                            <goal>copy</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.axis2</groupId>
+                                    <artifactId>addressing</artifactId>
+                                    <version>${addressing.version}</version>
+                                    <type>mar</type>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>target/repository/modules</outputDirectory>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.apache.axis2</groupId>
+                                    <artifactId>addressing</artifactId>
+                                    <version>${addressing.version}</version>
+                                    <type>mar</type>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>test-resources/repository/modules</outputDirectory>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
@@ -362,6 +435,88 @@
                             <goal>run</goal>
                         </goals>
                     </execution>
+
+                    <execution>
+                        <id>create_repo</id>
+                        <phase>generate-test-resources</phase>
+                        <configuration>
+                            <tasks>
+
+                                <!-- 1. Generate Key -->
+                                <delete file="conf/wso2wsas.jks"/>
+                                <genkey alias="wso2wsas" storepass="wso2wsas" keyalg="RSA"
+                                        keystore="conf/wso2wsas.jks"
+                                        validity="99999">
+                                    <dname>
+                                        <param name="CN" value="WSO2WSAS"/>
+                                        <param name="OU" value=""/>
+                                        <param name="O" value="WSO2"/>
+                                        <param name="C" value="LK"/>
+                                    </dname>
+                                </genkey>
+
+                                <!--2. Creating administration services -->
+                                <mkdir dir="target/toAdmin"/>
+                                <mkdir dir="target/toAdmin/service/META-INF"/>
+                                <mkdir dir="target/toAdmin/module/META-INF"/>
+                                <copy file="src/org/wso2/wsas/admin/module/admin/META-INF/module.xml"
+                                      tofile="target/toAdmin/module/META-INF/module.xml"/>
+                                <copy file="src/org/wso2/wsas/admin/service/META-INF/services.xml"
+                                      tofile="target/toAdmin/service/META-INF/services.xml"/>
+
+                                <!--<copy file="../wsf-common-core/src/org/wso2/wsf/common/codegen/service/META-INF/JavaClientGeneratorService.wsdl"
+                                      tofile="target/toAdmin/service/META-INF/JavaClientGeneratorService.wsdl"/>-->
+
+                                <jar jarfile="target/WSO2WSASAdministration.aar"
+                                     basedir="target/toAdmin/service">
+                                    <include name="**"/>
+                                </jar>
+                                <jar jarfile="target/wso2wsas_admin-${wso2wsas.version}.mar"
+                                     basedir="target/toAdmin/module">
+                                    <include name="**"/>
+                                </jar>
+
+                                <delete dir="target/toAdmin"/>
+
+                                <mkdir dir="target/repository"/>
+                                <mkdir dir="target/test-classes"/>
+
+                                <copy todir="target/repository">
+                                    <fileset file="../core/test-resources/axis2.xml"/>
+                                </copy>
+                                <copy file="target/wso2wsas_admin-${wso2wsas.version}.mar"
+                                      tofile="target/repository/modules/wso2wsas_admin-${wso2wsas.version}.mar"/>
+                                <copy todir="target/repository/modules">
+                                    <fileset file="target/wso2wsas_admin-${wso2wsas.version}.mar"/>
+                                </copy>
+
+                                <copy tofile="target/test-classes/wso2wsas.hibernate.cfg.xml">
+                                    <fileset file="../core/conf/hibernate/test-hibernate.cfg.xml"/>
+                                </copy>
+
+
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+
+                    <execution>
+                        <id>populate_repo</id>
+                        <phase>process-test-resources</phase>
+                        <configuration>
+                            <tasks>
+                                <!-- 1. Processing Hibernate config and hbm xmls to test cases. Should find a
+                                        better way to do this.
+                                -->
+
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
                 </executions>
             </plugin>
         </plugins>

Modified: wsas/java/trunk/modules/core/pom.xml
==============================================================================
--- wsas/java/trunk/modules/core/pom.xml	(original)
+++ wsas/java/trunk/modules/core/pom.xml	Thu Dec 14 04:02:45 2006
@@ -306,6 +306,12 @@
             <groupId>org.springframework</groupId>
             <artifactId>spring</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>addressing</artifactId>
+            <type>mar</type>
+        </dependency>
     </dependencies>
 
     <build>
@@ -330,6 +336,156 @@
                     <target>1.4</target>
                 </configuration>
             </plugin>
+            <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <inherited>true</inherited>
+                <configuration>
+                    <testFailureIgnore>false</testFailureIgnore>
+                    <skip>false</skip>
+                    <excludes>
+                        <exclude>**/*Abstract*.java</exclude>
+                    </excludes>
+                    <includes>
+                        <include>**/*Test.java</include>
+                    </includes>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.0-alpha-1-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <id>copy</id>
+                        <phase>generate-test-resources</phase>
+                        <goals>
+                            <goal>copy</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.axis2</groupId>
+                                    <artifactId>addressing</artifactId>
+                                    <version>${addressing.version}</version>
+                                    <type>mar</type>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>target/repository/modules</outputDirectory>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <version>1.1</version>
+                <executions>
+                    <execution>
+                        <id>create_repo</id>
+                        <phase>generate-test-resources</phase>
+                        <configuration>
+                            <tasks>
+                                <!-- 1. Generate keystore for wsas-->
+                                <delete file="conf/wso2wsas.jks"/>
+                                <genkey alias="wso2wsas" storepass="wso2wsas" keyalg="RSA"
+                                        keystore="conf/wso2wsas.jks"
+                                        validity="99999">
+                                    <dname>
+                                        <param name="CN" value="WSO2WSAS"/>
+                                        <param name="OU" value=""/>
+                                        <param name="O" value="WSO2"/>
+                                        <param name="C" value="LK"/>
+                                    </dname>
+                                </genkey>
+
+                                <!-- 2. Generating arrs for test cases as well as using in building the distribution -->
+                                <!-- Adding the version sample -->
+                                <mkdir dir="target/version/META-INF"/>
+                                <copy todir="target/version">
+                                    <fileset dir="target/classes">
+                                        <include name="org/wso2/wsas/services/version/**"/>
+                                    </fileset>
+                                </copy>
+
+                                <copy todir="target/version/META-INF">
+                                    <fileset dir="src/org/wso2/wsas/services/version/META-INF">
+                                        <include name="*.xml"/>
+                                        <include name="*.wsdl"/>
+                                    </fileset>
+                                </copy>
+                                <jar destfile="target/version.aar" basedir="target/version"/>
+
+                                <copy file="target/version.aar"
+                                      tofile="target/repository/services/version.aar"/>
+
+                                <!-- Adding the echo sample -->
+                                <mkdir dir="target/echo/META-INF"/>
+                                <copy todir="target/echo">
+                                    <fileset dir="target/classes">
+                                        <include name="org/wso2/wsas/echo/version/**"/>
+                                    </fileset>
+                                </copy>
+                                <copy todir="target/echo/META-INF">
+                                    <fileset dir="src/org/wso2/wsas/services/echo/META-INF">
+                                        <include name="*.*"/>
+                                    </fileset>
+                                </copy>
+                                <jar destfile="target/echo.aar" basedir="target/echo"/>
+                                <copy file="target/echo.aar"
+                                      tofile="target/repository/services/echo.aar"/>
+                                <copy todir="target/repository">
+                                    <fileset file="test-resources/axis2.xml"/>
+                                </copy>
+
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+
+                    <execution>
+                        <id>populate_repo</id>
+                        <phase>process-test-resources</phase>
+                        <configuration>
+                            <tasks>
+                                <!-- 1. Processing Hibernate config and hbm xmls to test cases. Should find a
+                                        better way to do this.
+                                -->
+                                <mkdir dir="target/test-classes"/>
+                                <copy todir="target/test-classes">
+                                    <fileset dir="conf/hibernate"/>
+                                </copy>
+                                <delete file="target/test-classes/wso2wsas.hibernate.cfg.xml"/>
+                                <copy tofile="target/test-classes/wso2wsas.hibernate.cfg.xml">
+                                    <fileset file="conf/hibernate/test-hibernate.cfg.xml"/>
+                                </copy>
+
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+
         </plugins>
 
     </build>

Modified: wsas/java/trunk/modules/core/src/org/wso2/wsas/Main.java
==============================================================================
--- wsas/java/trunk/modules/core/src/org/wso2/wsas/Main.java	(original)
+++ wsas/java/trunk/modules/core/src/org/wso2/wsas/Main.java	Thu Dec 14 04:02:45 2006
@@ -134,6 +134,7 @@
             jettyServer =
                     new JettyServer(serverManager.configContext,
                                     ServerManager.httpPort);
+            jettyServer.isTestMode = serverManager.isTestMode;
             jettyServer.start();
         } catch (Exception e) {
             throw new RuntimeException(e);

Modified: wsas/java/trunk/modules/core/src/org/wso2/wsas/transport/jetty/JettyServer.java
==============================================================================
--- wsas/java/trunk/modules/core/src/org/wso2/wsas/transport/jetty/JettyServer.java	(original)
+++ wsas/java/trunk/modules/core/src/org/wso2/wsas/transport/jetty/JettyServer.java	Thu Dec 14 04:02:45 2006
@@ -43,6 +43,8 @@
     protected ConfigurationContext configurationContext;
     private static JettyWebConfiguration jettyConfig = JettyWebConfiguration.getInstance();
 
+    public boolean isTestMode = false;
+
     int httpPort = -1;
     int httpsPort = -1;
 
@@ -156,13 +158,16 @@
             context17.addHandler(extraDocsResourceHandler);
 
             RequestLogHandler requestLogHandler = new RequestLogHandler();
-            NCSARequestLog requestLog = new NCSARequestLog("./logs/jetty-" + (new SimpleDateFormat(
-                    "yyyy-MM-dd").format(new Date())) + ".log");
-            requestLog.setExtended(false);
-            requestLog.setAppend(true);
-            requestLog.setRetainDays(1);
-            requestLog.setLogTimeZone("GMT");
-            requestLogHandler.setRequestLog(requestLog);
+            if (!isTestMode) {
+                NCSARequestLog requestLog =
+                        new NCSARequestLog("./logs/jetty-" + (new SimpleDateFormat(
+                                "yyyy-MM-dd").format(new Date())) + ".log");
+                requestLog.setExtended(false);
+                requestLog.setAppend(true);
+                requestLog.setRetainDays(1);
+                requestLog.setLogTimeZone("GMT");
+                requestLogHandler.setRequestLog(requestLog);
+            }
 
             httpContext.setHandlers(new Handler[]{context1, context2, context3, context4, context5,
                                                   context6, context11, context12, context17});

Modified: wsas/java/trunk/modules/core/test/org/wso2/wsas/JettyServerTest.java
==============================================================================
--- wsas/java/trunk/modules/core/test/org/wso2/wsas/JettyServerTest.java	(original)
+++ wsas/java/trunk/modules/core/test/org/wso2/wsas/JettyServerTest.java	Thu Dec 14 04:02:45 2006
@@ -34,12 +34,14 @@
 
 public class JettyServerTest extends TestCase {
     protected QName operationName = new QName("getVersion");
+    protected ServerUtils serverUtils;
 
     protected void setUp() throws Exception {
         ServerConfiguration.configurationXMLLocation = "conf/server.xml";
         System.setProperty("axis2.xml", "target/repository/axis2.xml");
         System.setProperty(ServerConstants.DERBY_HOME, "conf");
-        new ServerUtils().startServer();
+        serverUtils = new ServerUtils();
+        serverUtils.startServer();
     }
 
     public void testEchoXMLSync() throws Exception {
@@ -69,7 +71,7 @@
     }
 
     protected void tearDown() throws Exception {
-//        new ServerUtils().shutdown();
+        serverUtils.shutdown();
     }
 
     public static OMElement createDummyOMElement() {

Modified: wsas/java/trunk/modules/integration/pom.xml
==============================================================================
--- wsas/java/trunk/modules/integration/pom.xml	(original)
+++ wsas/java/trunk/modules/integration/pom.xml	Thu Dec 14 04:02:45 2006
@@ -363,6 +363,29 @@
             <groupId>org.springframework</groupId>
             <artifactId>spring</artifactId>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>addressing</artifactId>
+            <type>mar</type>
+        </dependency>
+
+        <dependency>
+            <groupId>org.wso2.wsas</groupId>
+            <artifactId>wso2wsas-core</artifactId>
+            <version>${pom.version}</version>
+            <type>test-jar</type>
+        </dependency>
+
+        <!-- System dependency -->
+        <dependency>
+            <groupId>sun.jdk</groupId>
+            <artifactId>tools</artifactId>
+            <version>${java.version}</version>
+            <scope>system</scope>
+            <systemPath>${java.home}/../lib/tools.jar</systemPath>
+        </dependency>
+
     </dependencies>
 
     <build>
@@ -387,7 +410,122 @@
                     <target>1.4</target>
                 </configuration>
             </plugin>
+
+
+            <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <inherited>false</inherited>
+                <configuration>
+                    <testFailureIgnore>false</testFailureIgnore>
+                    <skip>false</skip>
+                    <excludes>
+                        <exclude>**/*Abstract*.java</exclude>
+                        <exclude>**/*JavaClientGeneratorServiceTest.java</exclude>
+                    </excludes>
+                    <includes>
+                        <include>**/*Test.java</include>
+                    </includes>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>2.0-alpha-1-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <id>copy</id>
+                        <phase>generate-test-resources</phase>
+                        <goals>
+                            <goal>copy</goal>
+                        </goals>
+                        <configuration>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.apache.axis2</groupId>
+                                    <artifactId>addressing</artifactId>
+                                    <version>${addressing.version}</version>
+                                    <type>mar</type>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>target/repository/modules</outputDirectory>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+
+                    <execution>
+                        <id>create_repo</id>
+                        <phase>generate-test-resources</phase>
+                        <configuration>
+                            <tasks>
+                                <!-- 1. Generate key -->
+                                <delete file="conf/wso2wsas.jks" failonerror="false"/>
+                                <genkey alias="wso2wsas" storepass="wso2wsas" keyalg="RSA"
+                                        keystore="conf/wso2wsas.jks"
+                                        validity="99999">
+                                    <dname>
+                                        <param name="CN" value="WSO2WSAS"/>
+                                        <param name="OU" value=""/>
+                                        <param name="O" value="WSO2"/>
+                                        <param name="C" value="LK"/>
+                                    </dname>
+                                </genkey>
+
+                                <!--2. Test cases related repository -->
+                                <mkdir dir="target/test-classes"/>
+                                <mkdir dir="target/repository"/>
+
+                                <copy tofile="target/test-classes/wso2wsas.hibernate.cfg.xml">
+                                    <fileset file="../core/conf/hibernate/test-hibernate.cfg.xml"/>
+                                </copy>
+
+                                <copy todir="target/repository">
+                                    <fileset file="../core/test-resources/axis2.xml"/>
+                                </copy>
+                                <copy todir="target/test-classes">
+                                    <fileset dir="../core/conf/hibernate"/>
+                                </copy>
+                                <copy todir="target/repository/modules">
+                                    <fileset
+                                            file="../admin/target/wso2wsas_admin-${wso2wsas.version}.mar"/>
+                                </copy>
+                                <copy tofile="target/test-classes/wso2wsas.hibernate.cfg.xml">
+                                    <fileset file="../core/conf/hibernate/test-hibernate.cfg.xml"/>
+                                </copy>
+
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+
+                    <execution>
+                        <id>populate_repo</id>
+                        <phase>process-test-resources</phase>
+                        <configuration>
+                            <tasks>
+                                <!-- 1. Processing Hibernate config and hbm xmls to test cases. Should find a
+                                        better way to do this.
+                                -->
+
+                            </tasks>
+                        </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
+
     </build>
 
 </project>

Added: wsas/java/trunk/modules/integration/test/org/wso2/wsas/sample/commodityquote/CommodityQuoteCallbackHandlerTest.java
==============================================================================
--- (empty file)
+++ wsas/java/trunk/modules/integration/test/org/wso2/wsas/sample/commodityquote/CommodityQuoteCallbackHandlerTest.java	Thu Dec 14 04:02:45 2006
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.wso2.wsas.sample.commodityquote;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import org.wso2.wsas.sample.commodityquote.client.CommodityQuoteCallbackHandler;
+import org.wso2.www.types.client.GetQuoteResponse;
+import org.wso2.www.types.client.StockQuote;
+import org.wso2.www.types.client.GetSymbolsResponse;
+import org.wso2.www.types.client.ArrayOfString;
+/*
+ * 
+ */
+
+public class CommodityQuoteCallbackHandlerTest extends CommodityQuoteCallbackHandler {
+
+    private boolean complete;
+
+    public CommodityQuoteCallbackHandlerTest() {
+        super(null);
+        complete = false;
+    }
+
+    public boolean isComplete() {
+        return complete;
+    }
+
+    private void setComplete(boolean complete) {
+        this.complete = complete;
+    }
+
+    public void receiveResultgetQuote(GetQuoteResponse param21) {
+        TestCase.assertNotNull(param21);
+        StockQuote stockQuote = param21.getStockQuote();
+        Assert.assertEquals(stockQuote.getSymbol(), "mn");
+        Assert.assertEquals(stockQuote.getName(), "Manganese");
+        setComplete(true);
+    }
+
+    public void receiveResultgetSymbols(GetSymbolsResponse param23) {
+        TestCase.assertNotNull(param23);
+        ArrayOfString symbols = param23.get_return();
+        String[] symbolArr = symbols.getValue();
+        TestCase.assertEquals(symbolArr[0], "mn");
+        TestCase.assertEquals(symbolArr[1], "tm");
+        setComplete(true);
+    }
+
+}

Modified: wsas/java/trunk/modules/integration/test/org/wso2/wsas/sample/commodityquote/CommodityQuoteServiceIntegrationTest.java
==============================================================================
--- wsas/java/trunk/modules/integration/test/org/wso2/wsas/sample/commodityquote/CommodityQuoteServiceIntegrationTest.java	(original)
+++ wsas/java/trunk/modules/integration/test/org/wso2/wsas/sample/commodityquote/CommodityQuoteServiceIntegrationTest.java	Thu Dec 14 04:02:45 2006
@@ -300,39 +300,4 @@
 
     }
 
-    class CommodityQuoteCallbackHandlerTest extends CommodityQuoteCallbackHandler {
-        private boolean complete;
-
-        public CommodityQuoteCallbackHandlerTest() {
-            super(null);
-            complete = false;
-        }
-
-        public boolean isComplete() {
-            return complete;
-        }
-
-        private void setComplete(boolean complete) {
-            this.complete = complete;
-        }
-
-        public void receiveResultgetQuote(GetQuoteResponse param21) {
-            assertNotNull(param21);
-            StockQuote stockQuote = param21.getStockQuote();
-            Assert.assertEquals(stockQuote.getSymbol(), "mn");
-            Assert.assertEquals(stockQuote.getName(), "Manganese");
-            setComplete(true);
-        }
-
-        public void receiveResultgetSymbols(GetSymbolsResponse param23) {
-            assertNotNull(param23);
-            ArrayOfString symbols = param23.get_return();
-            String[] symbolArr = symbols.getValue();
-            assertEquals(symbolArr[0], "mn");
-            assertEquals(symbolArr[1], "tm");
-            setComplete(true);
-        }
-
-    }
-
 }




More information about the Wsas-java-dev mailing list