Added: webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_56_Integration.java URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_56_Integration.java?rev=571070&view=auto ============================================================================== --- webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_56_Integration.java (added) +++ webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_56_Integration.java Thu Aug 30 01:35:45 2007 @@ -0,0 +1,24 @@ +package org.apache.synapse.samples.n2n; + +import org.apache.synapse.Constants; +import samples.userguide.StockQuoteClient; + +/** + * + */ +public class SynapseSample_56_Integration extends AbstractAutomationTestCase { + + protected void setUp() throws Exception { + System.setProperty(Constants.SYNAPSE_XML, SAMPLE_CONFIG_ROOT_PATH + "synapse_sample_56.xml"); + System.setProperty("addurl", SYNAPSE_BASE_URL); + System.setProperty("symbol", "IBM"); + System.setProperty("mode", "quote"); + super.setUp(); + } + + public void testSample() throws Exception { + String resultString = getStringResultOfTest(StockQuoteClient.executeTestClient()); + assertXpathExists("ns:getQuoteResponse", resultString); + assertXpathExists("ns:getQuoteResponse/ns:return", resultString); + } +}
Added: webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_57_Integration.java URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_57_Integration.java?rev=571070&view=auto ============================================================================== --- webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_57_Integration.java (added) +++ webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_57_Integration.java Thu Aug 30 01:35:45 2007 @@ -0,0 +1,24 @@ +package org.apache.synapse.samples.n2n; + +import org.apache.synapse.Constants; +import samples.userguide.StockQuoteClient; + +/** + * + */ +public class SynapseSample_57_Integration extends AbstractAutomationTestCase { + + protected void setUp() throws Exception { + System.setProperty(Constants.SYNAPSE_XML, SAMPLE_CONFIG_ROOT_PATH + "synapse_sample_57.xml"); + System.setProperty("addurl", SYNAPSE_BASE_URL); + System.setProperty("symbol", "IBM"); + System.setProperty("mode", "quote"); + super.setUp(); + } + + public void testSample() throws Exception { + String resultString = getStringResultOfTest(StockQuoteClient.executeTestClient()); + assertXpathExists("ns:getQuoteResponse", resultString); + assertXpathExists("ns:getQuoteResponse/ns:return", resultString); + } +} Added: webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_5_Integration.java URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_5_Integration.java?rev=571070&view=auto ============================================================================== --- webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_5_Integration.java (added) +++ webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_5_Integration.java Thu Aug 30 01:35:45 2007 @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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.apache.synapse.samples.n2n; + +import org.apache.synapse.Constants; +import org.apache.axis2.AxisFault; +import samples.userguide.StockQuoteClient; + +/** + * + */ +public class SynapseSample_5_Integration extends AbstractAutomationTestCase { + + protected void setUp() throws Exception { + System.setProperty(Constants.SYNAPSE_XML, SAMPLE_CONFIG_ROOT_PATH + "synapse_sample_5.xml"); + System.setProperty("addurl", "http://localhost:9000/soap/SimpleStockQuoteService"); + System.setProperty("trpurl", SYNAPSE_BASE_URL); + super.setUp(); + } + + public void testSample() throws Exception { + System.setProperty("symbol", "MSFT"); + try { + getStringResultOfTest(StockQuoteClient.executeTestClient()); + } catch (AxisFault f) { + assertEquals("java.net.UnknownHostException: bogus", f.getReason()); + } + + System.setProperty("symbol", "SUN"); + try { + getStringResultOfTest(StockQuoteClient.executeTestClient()); + } catch (AxisFault f) { + assertEquals("java.net.ConnectException: Connection refused", f.getReason()); + } + } +} Added: webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_600_Integration.java URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_600_Integration.java?rev=571070&view=auto ============================================================================== --- webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_600_Integration.java (added) +++ webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_600_Integration.java Thu Aug 30 01:35:45 2007 @@ -0,0 +1,34 @@ +package org.apache.synapse.samples.n2n; + +import org.apache.synapse.Constants; +import org.apache.axis2.AxisFault; +import samples.userguide.StockQuoteClient; + +/** + * + */ +public class SynapseSample_600_Integration extends AbstractAutomationTestCase { + + protected void setUp() throws Exception { + System.setProperty(Constants.SYNAPSE_XML, SAMPLE_CONFIG_ROOT_PATH + "synapse_sample_600.xml"); + System.setProperty("addurl", SYNAPSE_BASE_URL); + System.setProperty("mode", "quote"); + System.setProperty("symbol", "IBM"); + super.setUp(); + } + + public void testSample() throws Exception { + getStringResultOfTest(StockQuoteClient.executeTestClient()); + getStringResultOfTest(StockQuoteClient.executeTestClient()); + getStringResultOfTest(StockQuoteClient.executeTestClient()); + String resultString = getStringResultOfTest(StockQuoteClient.executeTestClient()); + assertXpathExists("ns:getQuoteResponse", resultString); + assertXpathExists("ns:getQuoteResponse/ns:return", resultString); + + try { + getStringResultOfTest(StockQuoteClient.executeTestClient()); + } catch (AxisFault f) { + assertEquals("**Access Denied**", f.getReason()); + } + } +} Added: webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_60_Integration.java URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_60_Integration.java?rev=571070&view=auto ============================================================================== --- webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_60_Integration.java (added) +++ webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_60_Integration.java Thu Aug 30 01:35:45 2007 @@ -0,0 +1,24 @@ +package org.apache.synapse.samples.n2n; + +import org.apache.synapse.Constants; +import samples.userguide.StockQuoteClient; + +/** + * + */ +public class SynapseSample_60_Integration extends AbstractAutomationTestCase { + + protected void setUp() throws Exception { + System.setProperty(Constants.SYNAPSE_XML, SAMPLE_CONFIG_ROOT_PATH + "synapse_sample_60.xml"); + System.setProperty("addurl", SYNAPSE_BASE_URL); + System.setProperty("symbol", "IBM"); + System.setProperty("mode", "quote"); + super.setUp(); + } + + public void testSample() throws Exception { + String resultString = getStringResultOfTest(StockQuoteClient.executeTestClient()); + assertXpathExists("ns:getQuoteResponse", resultString); + assertXpathExists("ns:getQuoteResponse/ns:return", resultString); + } +} Added: webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_6_Integration.java URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_6_Integration.java?rev=571070&view=auto ============================================================================== --- webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_6_Integration.java (added) +++ webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_6_Integration.java Thu Aug 30 01:35:45 2007 @@ -0,0 +1,41 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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.apache.synapse.samples.n2n; + +import org.apache.synapse.Constants; +import samples.userguide.StockQuoteClient; + +/** + * + */ +public class SynapseSample_6_Integration extends AbstractAutomationTestCase { + + protected void setUp() throws Exception { + System.setProperty(Constants.SYNAPSE_XML, SAMPLE_CONFIG_ROOT_PATH + "synapse_sample_6.xml"); + System.setProperty("trpurl", SYNAPSE_BASE_URL + "soap/SimpleStockQuoteService"); + super.setUp(); + } + + public void testSample() throws Exception { + String resultString = getStringResultOfTest(StockQuoteClient.executeTestClient()); + assertXpathExists("ns:getQuoteResponse", resultString); + assertXpathExists("ns:getQuoteResponse/ns:return", resultString); + } +} Added: webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_7_Integration.java URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_7_Integration.java?rev=571070&view=auto ============================================================================== --- webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_7_Integration.java (added) +++ webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_7_Integration.java Thu Aug 30 01:35:45 2007 @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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.apache.synapse.samples.n2n; + +import org.apache.synapse.Constants; +import org.apache.axis2.AxisFault; +import samples.userguide.StockQuoteClient; + +/** + * + */ +public class SynapseSample_7_Integration extends AbstractAutomationTestCase { + + protected void setUp() throws Exception { + System.setProperty(Constants.SYNAPSE_XML, SAMPLE_CONFIG_ROOT_PATH + "synapse_sample_7.xml"); + System.setProperty("addurl", "http://localhost:9000/soap/SimpleStockQuoteService"); + System.setProperty("trpurl", SYNAPSE_BASE_URL); + super.setUp(); + } + + public void testSample() throws Exception { + try { + getStringResultOfTest(StockQuoteClient.executeTestClient()); + } catch (AxisFault f) { + assertEquals("Invalid custom quote request", f.getMessage()); + } + } +} Added: webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_8_Integration.java URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_8_Integration.java?rev=571070&view=auto ============================================================================== --- webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_8_Integration.java (added) +++ webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_8_Integration.java Thu Aug 30 01:35:45 2007 @@ -0,0 +1,23 @@ +package org.apache.synapse.samples.n2n; + +import org.apache.synapse.Constants; +import samples.userguide.StockQuoteClient; + +/** + * + */ +public class SynapseSample_8_Integration extends AbstractAutomationTestCase { + + protected void setUp() throws Exception { + System.setProperty(Constants.SYNAPSE_XML, SAMPLE_CONFIG_ROOT_PATH + "synapse_sample_8.xml"); + System.setProperty("addurl", "http://localhost:9000/soap/SimpleStockQuoteService"); + System.setProperty("trpurl", SYNAPSE_BASE_URL); + System.setProperty("mode", "customquote"); + super.setUp(); + } + + public void testSample() throws Exception { + String resultString = getStringResultOfTest(StockQuoteClient.executeTestClient()); +// assertXpathExists("ms:CheckPriceResponse", resultString); todo : fix me + } +} Added: webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_9_Integration.java URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_9_Integration.java?rev=571070&view=auto ============================================================================== --- webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_9_Integration.java (added) +++ webservices/synapse/trunk/java/modules/samples/src/test/java/org/apache/synapse/samples/n2n/SynapseSample_9_Integration.java Thu Aug 30 01:35:45 2007 @@ -0,0 +1,23 @@ +package org.apache.synapse.samples.n2n; + +import org.apache.synapse.Constants; +import samples.userguide.StockQuoteClient; + +/** + * + */ +public class SynapseSample_9_Integration extends AbstractAutomationTestCase { + + protected void setUp() throws Exception { + System.setProperty(Constants.SYNAPSE_XML, SAMPLE_CONFIG_ROOT_PATH + "synapse_sample_9.xml"); + System.setProperty("addurl", "http://localhost:9000/soap/SimpleStockQuoteService"); + System.setProperty("trpurl", SYNAPSE_BASE_URL); + super.setUp(); + } + + public void testSample() throws Exception { + String resultString = getStringResultOfTest(StockQuoteClient.executeTestClient()); + assertXpathExists("ns:getQuoteResponse", resultString); + assertXpathExists("ns:getQuoteResponse/ns:return", resultString); + } +} Modified: webservices/synapse/trunk/java/pom.xml URL: http://svn.apache.org/viewvc/webservices/synapse/trunk/java/pom.xml?rev=571070&r1=571069&r2=571070&view=diff ============================================================================== --- webservices/synapse/trunk/java/pom.xml (original) +++ webservices/synapse/trunk/java/pom.xml Thu Aug 30 01:35:45 2007 @@ -170,7 +170,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>2.2</version> + <version>2.3</version> </plugin> <plugin> @@ -912,7 +912,7 @@ <!-- misc --> <junit.version>3.8.2</junit.version> <log4j.version>1.2.13</log4j.version> - <xmlunit.version>1.0</xmlunit.version> + <xmlunit.version>1.1</xmlunit.version> <wrapper.version>0.0</wrapper.version> <!-- dependencies of Synapse extensions module --> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
