Package org.modeshape.jdbc.delegate

Examples of org.modeshape.jdbc.delegate.ConnectionInfo


    @Test
    public void shouldCreateConnectionInfoForUrlWithEscapedCharacters() throws SQLException {
        validUrl = JcrDriver.JNDI_URL_PREFIX
                   + "java:nameInJndi?workspace=My%20Workspace&user=j%20smith&password=secret&repositoryName=My%20Repository&teiidsupport=true";
        ConnectionInfo info = driver.createConnectionInfo(validUrl, validProperties);
        assertThat(info.getWorkspaceName(), is("My Workspace"));
        assertThat(info.getUsername(), is("j smith"));
        assertThat(info.getPassword(), is("secret".toCharArray()));
        assertThat(info.getRepositoryName(), is("My Repository"));
        assertThat(info.isTeiidSupport(), is(true));
    }
View Full Code Here


    @Test
    public void shouldCreateConnectionInfoButIndicateNoTeiidSupport() throws SQLException {
        validUrl = JcrDriver.JNDI_URL_PREFIX
                   + "java:nameInJndi?workspace=My%20Workspace&user=j%20smith&password=secret&repositoryName=My%20Repository";
        ConnectionInfo info = driver.createConnectionInfo(validUrl, validProperties);
        assertThat(info.isTeiidSupport(), is(false));
    }
View Full Code Here

    }

    @Test
    public void shouldCreateConnectionInfoForUrlWithEscapedCharacters() throws SQLException {
        validUrl = JcrDriver.HTTP_URL_PREFIX + validServerName + "/modeshape%20rest?repositoryName=My%20Repository&workspace=My%20Workspace&user=j%20smith&password=secret";
        ConnectionInfo info = driver.createConnectionInfo(validUrl, validProperties);
        assertThat(info.getWorkspaceName(), is("My Workspace"));
        assertThat(info.getUsername(), is("j smith"));
        assertThat(info.getPassword(), is("secret".toCharArray()));
        assertThat(info.getRepositoryName(), is("My Repository"));
    }
View Full Code Here

    @Override
    public DriverPropertyInfo[] getPropertyInfo( String url,
                                                 Properties info ) throws SQLException {
        // Get the connection information ...
        RepositoryDelegate repositoryDelegate = delegateFactory.createRepositoryDelegate(url, info, this.contextFactory);
        ConnectionInfo connectionInfo = repositoryDelegate.getConnectionInfo();
        return connectionInfo.getPropertyInfos();
    }
View Full Code Here

    @Test
    public void shouldCreateConnectionInfoForUrlWithEscapedCharacters() throws SQLException {
        validUrl = LocalJcrDriver.JNDI_URL_PREFIX
                   + "java:nameInJndi?workspace=My%20Workspace&user=j%20smith&password=secret&repositoryName=My%20Repository&teiidsupport=true";
        ConnectionInfo info = driver.createConnectionInfo(validUrl, validProperties);
        assertThat(info.getWorkspaceName(), is("My Workspace"));
        assertThat(info.getUsername(), is("j smith"));
        assertThat(info.getPassword(), is("secret".toCharArray()));
        assertThat(info.getRepositoryName(), is("My Repository"));
        assertThat(info.isTeiidSupport(), is(Boolean.TRUE.booleanValue()));
    }
View Full Code Here

    @Test
    public void shouldCreateConnectionInfoButIndicateNoTeiidSupport() throws SQLException {
        validUrl = LocalJcrDriver.JNDI_URL_PREFIX
                   + "java:nameInJndi?workspace=My%20Workspace&user=j%20smith&password=secret&repositoryName=My%20Repository";
        ConnectionInfo info = driver.createConnectionInfo(validUrl, validProperties);
        assertThat(info.isTeiidSupport(), is(Boolean.FALSE.booleanValue()));
    }
View Full Code Here

TOP

Related Classes of org.modeshape.jdbc.delegate.ConnectionInfo

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.