Examples of Driver


Examples of fi.jumi.api.drivers.Driver

        finder = new JUnitCompatibilityDriverFinder();
    }

    @Test
    public void supports_JUnit_3_tests() {
        Driver driver = finder.findTestClassDriver(JUnit3Test.class);

        assertThat(driver, is(instanceOf(JUnitCompatibilityDriver.class)));
    }
View Full Code Here

Examples of github.priyatam.springrest.domain.Driver

    @RequestMapping(method = RequestMethod.GET, value = "/driver/{licenseNo}")
    @ResponseBody
    public ResponseEntity<Driver> getDriver(@PathVariable String licenseNo) {
        logger.debug(String.format("Retrieving Driver %s :", licenseNo));

        Driver driver = persistenceHelper.loadDriverByLicenseNum(licenseNo);
        if (driver == null) {
            logger.warn("No Driver found");
            return new ResponseEntity<Driver>(null, new HttpHeaders(), HttpStatus.NOT_FOUND);
        }
View Full Code Here

Examples of it.cdq.selenium.Driver

  private void start(String qualifier, Class<? extends Driver> clazz,
      String name, int n, int tot) {
    List<it.cdq.model.Trip> toDo = csv.generateTripList();
    List<it.cdq.model.Trip> partial = csv.splittedTripList(name, n, tot);

    Driver drive = beanFactory.getBean(qualifier, clazz);
    drive.setName(name + "_" + n + "_" + tot + "[" + partial.size() + "]");
    drive.setTripList(partial);
    taskExecutor.execute((Runnable) drive);
  }
View Full Code Here

Examples of java.sql.Driver

        stat.execute("DROP TABLE IF EXISTS TEST_TEMP");
        conn.close();
    }

    private void testStatic() throws SQLException {
        Driver dr = org.h2.Driver.load();

        assertEquals(dr.getMajorVersion(), meta.getDriverMajorVersion());
        assertEquals(dr.getMinorVersion(), meta.getDriverMinorVersion());
        assertTrue(dr.jdbcCompliant());

        assertEquals(0, dr.getPropertyInfo(null, null).length);
        assertTrue(dr.connect("jdbc:test:false", null) == null);

        assertTrue(meta.getNumericFunctions().length() > 0);
        assertTrue(meta.getStringFunctions().length() > 0);
        assertTrue(meta.getSystemFunctions().length() > 0);
        assertTrue(meta.getTimeDateFunctions().length() > 0);
View Full Code Here

Examples of java.sql.Driver

     * This method is called using reflection.
     */
    static void runTest() throws Exception {
        Class.forName("org.h2.Driver");
        Class.forName("org.h2.upgrade.v1_1.Driver");
        Driver d1 = DriverManager.getDriver("jdbc:h2:mem:test");
        Driver d2 = DriverManager.getDriver("jdbc:h2v1_1:mem:test");
        Connection connection;
        connection = DriverManager.getConnection("jdbc:h2:mem:test");
        DriverManager.deregisterDriver(d1);
        DriverManager.deregisterDriver(d2);
        connection.close();
View Full Code Here

Examples of java.sql.Driver

            driverClass = cl.loadClass("org.h2.Driver");
        } catch (ClassNotFoundException e) {
            return null;
        }
        Method m = driverClass.getMethod("load");
        Driver driver = (Driver) m.invoke(null);
        return driver;
    }
View Full Code Here

Examples of java.sql.Driver

                DriverManager.getConnection("jdbc:derby:;shutdown=true");
            } catch (SQLException e) {
                // ignore
            }
            try {
                Driver driver = (Driver) Class.forName(DRIVER).newInstance();
                DriverManager.registerDriver(driver);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
View Full Code Here

Examples of java.sql.Driver

     * @throws Exception
     */
    protected Connection getConnection()
        throws Exception
    {
        Driver driver = (Driver)ClassUtils.loadClass(this.jdbcDriver).newInstance();
        DriverManager.registerDriver(new JdbcDriverWrapper(driver));
        return DriverManager.getConnection(
            this.jdbcConnectionUrl,
            this.jdbcUsername,
            this.jdbcPassword);
View Full Code Here

Examples of java.sql.Driver

    private static String registerWrapperForName(String userDriverClassName) {
        String wrapperDriverClassName = null;

        try {
            //look in the classpath for a custom driver that supports the requested driver
            Driver userDriver = findRegisteredUserDriver(userDriverClassName);

            if (userDriver == null) {
                //there is no registered user driver, try registering it now
                try {
                    Class.forName(userDriverClassName);
View Full Code Here

Examples of java.sql.Driver

     * @return
     */
    public static Driver findRegisteredUserDriver(String userDriverClassName) {
        Enumeration en = DriverManager.getDrivers();
        while (en.hasMoreElements()) {
            Driver aDriver = (Driver) en.nextElement();
            if (aDriver.getClass().getName().equals(userDriverClassName)) {
                return aDriver;
            }
        }

        return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.