test_class.declarator: DB = ".db"
test_class.modifier: private static final
test_class.original_string: private static final String DB = ".db";
test_class.type: String
test_class.var_name: DB
test_class.declarator: T2PLATFORM = "t2platform-"
test_class.modifier: private static final
test_class.original_string: private static final String T2PLATFORM = "t2platform-";
test_class.type: String
test_class.var_name: T2PLATFORM
test_class.declarator: CREATE_TRUE = ";create=true"
test_class.modifier: private static final
test_class.original_string: private static final String CREATE_TRUE = ";create=true";
test_class.type: String
test_class.var_name: CREATE_TRUE
test_class.declarator: JDBC_DERBY = "jdbc:derby:"
test_class.modifier: private static final
test_class.original_string: private static final String JDBC_DERBY = "jdbc:derby:";
test_class.type: String
test_class.var_name: JDBC_DERBY
test_class.file: taverna-reference-impl/src/test/java/org/apache/taverna/platform/spring/jdbc/TemporaryJDBCTest.java
test_class.identifier: TemporaryJDBCTest
test_case.body: @Test
  	public void getDerby() throws Exception {
  		TemporaryJDBC temporaryJDBC = new TemporaryJDBC();
  		String jdbcURL = temporaryJDBC.getTemporaryDerbyJDBC();
  		assertTrue("Not a Derby URL", jdbcURL.startsWith(JDBC_DERBY));
  		String url = jdbcURL.split(JDBC_DERBY)[1];
  		assertTrue("Did not end with " + CREATE_TRUE, url.endsWith(CREATE_TRUE));
  		String location = url.split(CREATE_TRUE)[0];
  		assertFalse("Location was an empty string", location.equals(""));
  		File locationFile = new File(location);
  		assertFalse("File already exists: " + locationFile, locationFile.exists());
  		File parentFile = locationFile.getParentFile();
  		assertTrue("Parent directory did not exist", parentFile.isDirectory());
  		assertTrue("Did not end with " + T2PLATFORM, parentFile.getName().startsWith(T2PLATFORM));
  		assertTrue("Did not start with " + DB , parentFile.getName().endsWith(DB));
  	}
test_case.class_method_signature: TemporaryJDBCTest.getDerby()
test_case.full_signature: @Test public void getDerby()
test_case.identifier: getDerby
test_case.invocations: getTemporaryDerbyJDBC assertTrue startsWith split assertTrue endsWith split assertFalse equals assertFalse exists getParentFile assertTrue isDirectory assertTrue startsWith getName assertTrue endsWith getName
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void getDerby()
focal_class.file: taverna-reference-impl/src/main/java/org/apache/taverna/platform/spring/jdbc/TemporaryJDBC.java
focal_class.identifier: TemporaryJDBC
focal_class.class_method_signature: TemporaryJDBC.getTemporaryDerbyJDBC()
focal_class.full_signature: public String getTemporaryDerbyJDBC()
focal_class.identifier: getTemporaryDerbyJDBC
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getTemporaryDerbyJDBC()
focal_method.body: public String getTemporaryDerbyJDBC() throws IOException {
  		File tmpDir = createTempFile("t2platform-", ".db");
  		tmpDir.delete();
  		if (!tmpDir.mkdir())
  			throw new IOException("Could not create temporary directory "
  					+ tmpDir);
  		return "jdbc:derby:" + tmpDir.getPath() + "/database;create=true";
  	}
focal_method.class_method_signature: TemporaryJDBC.getTemporaryDerbyJDBC()
focal_method.full_signature: public String getTemporaryDerbyJDBC()
focal_method.identifier: getTemporaryDerbyJDBC
focal_method.invocations: createTempFile delete mkdir getPath
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: String
focal_method.signature: String getTemporaryDerbyJDBC()