01: package org.apache.synapse.samples.n2n;
02:
03: import org.apache.synapse.SynapseConstants;
04: import samples.userguide.StockQuoteClient;
05:
06: /**
07: *
08: */
09: public class SynapseSample_101_Integration extends
10: AbstractAutomationTestCase {
11:
12: protected void setUp() throws Exception {
13: System.setProperty(SynapseConstants.SYNAPSE_XML,
14: SAMPLE_CONFIG_ROOT_PATH + "synapse_sample_101.xml");
15: super .setUp();
16: }
17:
18: public void testSample() throws Exception {
19: System.setProperty("addurl", SYNAPSE_BASE_URL
20: + "soap/StockQuoteProxy1");
21: String resultString = getStringResultOfTest(StockQuoteClient
22: .executeTestClient());
23: assertXpathExists("ns:getQuoteResponse", resultString);
24: assertXpathExists("ns:getQuoteResponse/ns:return", resultString);
25:
26: System.setProperty("addurl", SYNAPSE_BASE_URL
27: + "soap/StockQuoteProxy2");
28: resultString = getStringResultOfTest(StockQuoteClient
29: .executeTestClient());
30: assertXpathExists("ns:getQuoteResponse", resultString);
31: assertXpathExists("ns:getQuoteResponse/ns:return", resultString);
32: }
33: }
|