Package com.hardcode.driverManager

Examples of com.hardcode.driverManager.DriverManager


        assertTrue(d.check(2, ValueFactory.createValue(2.323)) != null);
        d.stop();
    }
   
    public void testDriverTypes() throws Exception {
        DriverManager dm = ds.getDriverManager();
        FileDriver fd = (FileDriver) dm.getDriver("csv string");
        DBDriver dd = (DBDriver) dm.getDriver("GDBMS HSQLDB driver");
       
        String[] types = fd.getAvailableTypes();
        String[] params = fd.getParameters(types[0]);
        assertTrue(types.length == 1);
        assertTrue(types[0].equals("STRING"));
View Full Code Here


    }

    @Override
    protected void setUp() throws Exception {
        dsf = new DataSourceFactory();
        DriverManager dm = new DriverManager();
        dm.registerDriver("object", FailingObjectDriver.class);
        dm.registerDriver("writeFailingFile", WriteFailingFileDriver.class);
        dm.registerDriver("closeFailingFile", CloseFailingFileDriver.class);
        dm.registerDriver("copyFailingFile", CopyFailingFileDriver.class);
        dm.registerDriver("executeFailingDB", ExecuteFailingDBDriver.class);
        dm.registerDriver("closeFailingDB", CloseFailingDBDriver.class);
        dsf.setDriverManager(dm);
       
        dsf.registerDataSource("alphaObject", new ObjectSourceDefinition(new FailingObjectDriver()));
        dsf.registerDataSource("spatialObject", new SpatialObjectSourceDefinition(new FailingObjectDriver()));
        dsf.registerDataSource("alphaWriteFile", new FakeFileSourceDefinition(new WriteFailingFileDriver()));
View Full Code Here

   */
  private void setup() throws IOException, InstantiationException,
      IllegalAccessException, ClassNotFoundException, DriverLoadException {

    // Setup de los drivers
    DriverManager dm = new DriverManager();
    dm.setValidation(new DriverValidation() {
      public boolean validate(Driver d) {
        return ((d instanceof ObjectDriver) || (d instanceof DBDriver));
      }
    });
    dm.loadDrivers(new File("drivers"));

    dm.getLoadFailures();

    // Setup del factory de DataSources
    ds = new DataSourceFactory();
    ds.setDriverManager(dm);

View Full Code Here

TOP

Related Classes of com.hardcode.driverManager.DriverManager

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.