Package org.mule.tck.util

Examples of org.mule.tck.util.MuleDerbyTestDatabase


    private final MuleDerbyTestDatabase muleDerbyTestDatabase;

    private JdbcDatabaseSetUp(String databaseNameProperty)
    {
        muleDerbyTestDatabase = new MuleDerbyTestDatabase(databaseNameProperty);
    }
View Full Code Here


    }

    @Test
    public void verifiesDerby() throws Exception
    {
        MuleDerbyTestDatabase derbyTestDatabase = new MuleDerbyTestDatabase("database.name");
        try
        {
            derbyTestDatabase.startDatabase();
            String config = "<jdbc:connector name=\"jdbcConnector\" pollingFrequency=\"1000\" dataSource-ref=\"jdbcDataSource\" queryTimeout=\"3000\" xmlns:jdbc=\"http://www.mulesoft.org/schema/mule/jdbc\"/>";
            Document document = XMLUnit.buildControlDocument(config);
            String refDef =
                    "<spring:bean xmlns:spring=\"http://www.springframework.org/schema/beans\" class=\"org.apache.commons.dbcp.BasicDataSource\" destroy-method=\"close\" id=\"jdbcDataSource\" name=\"Bean\">"
                    + "<spring:property name=\"driverClassName\" value=\"org.apache.derby.jdbc.EmbeddedDriver\"/>"
                    + "<spring:property name=\"url\" value=\"jdbc:derby:muleEmbeddedDB;create=true\"/>"
                    + "</spring:bean>";
            XmlConfigurationCallback callback = new DatabaseConfigurationCallback(Collections.singletonMap("jdbcDataSource", refDef));

            doTest(document, callback);
        }
        finally
        {
            derbyTestDatabase.stopDatabase();
        }
    }
View Full Code Here

TOP

Related Classes of org.mule.tck.util.MuleDerbyTestDatabase

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.