Neo4jDataSource implements javax.sql.DataSource { @Override public boolean isWrapperFor(Class<?> iface) throws SQLException { return Wrapper.isWrapperFor(iface, this.getClass()); }  @Override PrintWriter getLogWriter(); @Override void setLogWriter(PrintWriter out); @Override void setLoginTimeout(int seconds); @Override int getLoginTimeout(); @Override Logger getParentLogger(); @Override T unwrap(Class<T> iface); @Override boolean isWrapperFor(Class<?> iface); String getServerName(); void setServerName(String serverName); String getUser(); void setUser(String user); String getPassword(); void setPassword(String password); int getPortNumber(); void setPortNumber(int portNumber); String getUrl(String protocol); boolean getIsSsl(); void setIsSsl(boolean ssl); static final String NEO4J_JDBC_PREFIX; }
@Test public void isWrapperForShouldReturnTrue() throws SQLException { assertTrue(this.dataSource.isWrapperFor(Neo4jDataSource.class)); assertTrue(this.dataSource.isWrapperFor(javax.sql.DataSource.class)); assertTrue(this.dataSource.isWrapperFor(javax.sql.CommonDataSource.class)); assertTrue(this.dataSource.isWrapperFor(java.sql.Wrapper.class)); }
@Test public void isWrapperForShouldReturnFalse() throws SQLException { assertFalse(this.dataSource.isWrapperFor(Neo4jResultSet.class)); assertFalse(this.dataSource.isWrapperFor(java.sql.Driver.class)); assertFalse(this.dataSource.isWrapperFor(Neo4jResultSet.class)); assertFalse(this.dataSource.isWrapperFor(java.sql.ResultSet.class)); }