Code example for Driver

Methods: acceptsURL

0
	@Test 
	public void shouldAcceptsWellFormattedURLOnly() throws ClassNotFoundException, SQLException { 
 
		Driver drv = new OrientJdbcDriver();
 
		assertTrue(drv.acceptsURL("jdbc:orient:local:./working/db/test"));
 
		assertFalse(drv.acceptsURL("local:./working/db/test"));
	} 
 
	@Test 
	public void shouldConnect() throws SQLException { 
 
		Properties info = new Properties();
		info.put("user", "admin");
		info.put("password", "admin");
 
		OrientJdbcConnection conn = (OrientJdbcConnection) DriverManager.getConnection("jdbc:orient:memory:test", info);
 
		assertNotNull(conn);
		conn.close();