/* simple test of getDataSource() which assumes addDataSource() works. */ public void testGetDataSource() { SPDataSource dbcs = new JDBCDataSource(target); dbcs.setName("cows"); target.addDataSource(dbcs); SPDataSource gotDbcs = target.getDataSource("cows"); assertNotNull(gotDbcs); assertSame(dbcs, gotDbcs); }
public void testHookUpDataSourceToParentType() throws Exception { testRead(); JDBCDataSource ds = target.getDataSource(FUN_DATASOURCE_NAME, JDBCDataSource.class); assertNotNull(ds); assertNotNull(ds.getParentType()); }
/* * Test method for 'ca.sqlpower.architect.PlDotIni.getConnections()' */ public void testGetConnections() throws IOException { testRead(); List l = target.getConnections(); assertEquals(1, l.size()); assertEquals(target.getDataSource(FUN_DATASOURCE_NAME), l.get(0)); }
/* * Ensures the read() method reads data sources properly, * assuming getDataSource() works properly */ public void testReadDataSource() throws IOException { testRead(); SPDataSource ds = target.getDataSource(FUN_DATASOURCE_NAME); assertNotNull(ds); }