use of org.apache.synapse.transport.http.conn.Scheme in project wso2-synapse by wso2.
the class BaseConfigurationTest method setUp.
@Before
public void setUp() throws Exception {
Parameter portParam = new Parameter("port", PORT);
portParam.setParameterElement(AXIOMUtil.stringToOM("<parameter name=\"port\" locked=\"false\">" + PORT + "</parameter>"));
Parameter hostParam = new Parameter("hostname", HOST);
transportInDescription.addParameter(portParam);
transportInDescription.addParameter(hostParam);
cfgCtx = new ConfigurationContext(new AxisConfiguration());
cfgCtx.setServicePath("services");
cfgCtx.setContextRoot("/");
scheme = new Scheme(transportInDescription.getName(), PORT, false);
metrics = new PassThroughTransportMetricsCollector(true, scheme.getName());
baseConfiguration = new SourceConfiguration(cfgCtx, transportInDescription, scheme, PassThroughTestUtils.getWorkerPool(conf), metrics);
baseConfiguration.build();
}
use of org.apache.synapse.transport.http.conn.Scheme in project wso2-synapse by wso2.
the class SourceConfigurationTest method setUp.
@Before
public void setUp() throws Exception {
Parameter portParam = new Parameter("port", PORT);
portParam.setParameterElement(AXIOMUtil.stringToOM("<parameter name=\"port\" locked=\"false\">" + PORT + "</parameter>"));
Parameter hostParam = new Parameter("hostname", HOST);
transportInDescription.addParameter(portParam);
transportInDescription.addParameter(hostParam);
cfgCtx = new ConfigurationContext(new AxisConfiguration());
cfgCtx.setServicePath("services");
cfgCtx.setContextRoot("/");
scheme = new Scheme(transportInDescription.getName(), PORT, false);
metrics = new PassThroughTransportMetricsCollector(true, scheme.getName());
sourceConfiguration = new SourceConfiguration(cfgCtx, transportInDescription, scheme, PassThroughTestUtils.getWorkerPool(passThroughConfiguration), metrics);
sourceConfiguration.build();
}
use of org.apache.synapse.transport.http.conn.Scheme in project wso2-synapse by wso2.
the class SourceConfigurationTest method testGetScheme.
@Test
public void testGetScheme() throws Exception {
Scheme scheme = sourceConfiguration.getScheme();
String expectedSchemeName = transportInDescription.getName();
Assert.assertNotNull("ResponseFactory hasn't been initialized.", scheme);
Assert.assertEquals("Scheme doesn't match with : " + expectedSchemeName, expectedSchemeName, scheme.getName());
}
Aggregations