Package org.mule.tck.junit4

Examples of org.mule.tck.junit4.FunctionalTestCase


    }

    @Override
    protected void doSetUpBeforeMuleContextCreation() throws Exception
    {
        ApplicationContextBuilder applicationContextBuilder = new ApplicationContextBuilder();
        applicationContextBuilder.setApplicationResources(new String[]{"wsdlAndXsdMockServer/proxy-wsdl-rewrite-schema-locations-conf-server.xml"});
        mockServerContext = applicationContextBuilder.build();
        super.doSetUpBeforeMuleContextCreation();
    }
View Full Code Here


    private MuleContext buildApp(String path) throws Exception
    {
        System.setProperty(PATH_PROPERTY, path);
        try
        {
            return new ApplicationContextBuilder().setApplicationResources(new String[] {"http-same-port-config.xml"}).build();
        }
        finally
        {
            System.clearProperty(PATH_PROPERTY);
        }
View Full Code Here

{

    @Test(expected = LifecycleException.class)
    public void invalidSelectorExpression() throws Exception
    {
        ApplicationContextBuilder builder = new ApplicationContextBuilder();
        builder.setApplicationResources(new String[] {"org/mule/test/integration/watermark/watermark-invalid-selector-expression-config.xml"});
        builder.build();
    }
View Full Code Here

{

    @Test(expected = LifecycleException.class)
    public void invalidUpdateExpression() throws Exception
    {
        ApplicationContextBuilder builder = new ApplicationContextBuilder();
        builder.setApplicationResources(new String[] {"org/mule/test/integration/watermark/watermark-invalid-expression-config.xml"});
        builder.build();
    }
View Full Code Here

        MuleContext firstAppContext = null;
        MuleContext secondAppContext = null;
        try
        {
            domainContext = new DomainContextBuilder().setDomainConfig("domain/http/http-shared-connector.xml").build();
            firstAppContext = new ApplicationContextBuilder().setApplicationResources(new String[] {"domain/http/http-hello-mule-app.xml"}).setDomainContext(domainContext).build();
            ApplicationContextBuilder secondApp = new ApplicationContextBuilder();
            secondAppContext = secondApp.setApplicationResources(new String[] {"domain/http/http-hello-world-app.xml"}).setDomainContext(domainContext).build();
            firstAppContext.stop();
            MuleMessage response = secondAppContext.getClient().send("http://localhost:" + dynamicPort.getNumber() + "/service/helloWorld", "test", null);
            assertThat(response, notNullValue());
            assertThat(response.getPayloadAsString(), is("hello world"));
            assertThat((domainContext.getRegistry().<Connector>get("sharedHttpConnector")).isStarted(), Is.is(true));
View Full Code Here

    @Test
    public void samePathDefinedInTwoAppsWithinSameDomain() throws Exception
    {
        MuleContext domainContext = new DomainContextBuilder().setDomainConfig("domain/http/http-shared-connector.xml").build();
        MuleContext firstAppContext = new ApplicationContextBuilder().setApplicationResources(new String[] {"domain/http/http-hello-mule-app.xml"}).setDomainContext(domainContext).build();
        ApplicationContextBuilder secondApp = new ApplicationContextBuilder();
        try
        {
            secondApp.setApplicationResources(new String[] {"domain/http/http-hello-mule-app.xml"}).setDomainContext(domainContext).build();
            fail("Second app context start should fail");
        }
        catch (Exception e)
        {
            assertThat(e.getCause(), IsInstanceOf.instanceOf(ConnectorException.class));
View Full Code Here

        MuleContext firstApp = null;
        MuleContext secondApp = null;
        try
        {
            domainContext = new DomainContextBuilder().setDomainConfig("domain/empty-domain-config.xml").build();
            firstApp = new ApplicationContextBuilder().setDomainContext(domainContext).setApplicationResources(new String[] {"domain/http/http-hello-world-app-no-connector.xml"}).build();
            expectedException.expect(LifecycleException.class);
            secondApp = new ApplicationContextBuilder().setDomainContext(domainContext).setApplicationResources(new String[] {"domain/http/http-hello-mule-app-no-connector.xml"}).build();
        }
        finally
        {
            closeQuietly(domainContext);
            closeQuietly(firstApp);
View Full Code Here

    }

    private void configureContexts(String domainConfig, String appConfig) throws Exception
    {
        domainContext = new DomainContextBuilder().setDomainConfig(domainConfig).build();
        applicationContext = new ApplicationContextBuilder().setApplicationResources(new String[] {appConfig}).setDomainContext(domainContext).build();
    }
View Full Code Here

        MuleContext domainContext = null;
        MuleContext firstAppContext = null;
        MuleContext secondAppContext = null;
        try
        {
            domainContext = new DomainContextBuilder().setDomainConfig("domain/http/http-shared-connector.xml").build();
            firstAppContext = new ApplicationContextBuilder().setApplicationResources(new String[] {"domain/http/http-hello-mule-app.xml"}).setDomainContext(domainContext).build();
            ApplicationContextBuilder secondApp = new ApplicationContextBuilder();
            secondAppContext = secondApp.setApplicationResources(new String[] {"domain/http/http-hello-world-app.xml"}).setDomainContext(domainContext).build();
            firstAppContext.stop();
            MuleMessage response = secondAppContext.getClient().send("http://localhost:" + dynamicPort.getNumber() + "/service/helloWorld", "test", null);
View Full Code Here

    public SystemProperty endpointScheme = getEndpointSchemeSystemProperty();

    @Test
    public void samePathDefinedInTwoAppsWithinSameDomain() throws Exception
    {
        MuleContext domainContext = new DomainContextBuilder().setDomainConfig("domain/http/http-shared-connector.xml").build();
        MuleContext firstAppContext = new ApplicationContextBuilder().setApplicationResources(new String[] {"domain/http/http-hello-mule-app.xml"}).setDomainContext(domainContext).build();
        ApplicationContextBuilder secondApp = new ApplicationContextBuilder();
        try
        {
            secondApp.setApplicationResources(new String[] {"domain/http/http-hello-mule-app.xml"}).setDomainContext(domainContext).build();
View Full Code Here

TOP

Related Classes of org.mule.tck.junit4.FunctionalTestCase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.