Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.j256.ormlite.db;
 
 import static org.junit.Assert.assertEquals;
 
 import java.io.File;
 
 import org.junit.Test;
	private final static String DATABASE_NAME = "ormlite";
	private final String DB_DIRECTORY = "target/" + getClass().getSimpleName();
	protected void setDatabaseParams() {
		 = "jdbc:h2:mem:" + ;
	}
	@Test(expected = SQLException.class)
		assertEquals(2, tableInfo.getFieldTypes().length);
		ArrayList<StringadditionalArgs = new ArrayList<String>();
		ArrayList<StringstatementsBefore = new ArrayList<String>();
		.appendColumnArg(sbtableInfo.getFieldTypes()[0], additionalArgsstatementsBeforenullnull);
	}
	public void testUsernamePassword() throws Exception {
	}
	@Test(expected = SQLException.class)
	public void testRemotePort() throws Exception {
		File dbDir = new File();
		TestUtils.deleteDirectory(dbDir);
		dbDir.mkdirs();
		// bad port
		int notTheRightPort = 12345;
		// try to disable the retry feature which delays this test failure
		System.setProperty("h2.socketConnectRetry""0");
		String dbUrl = "jdbc:h2:tcp://localhost:" + notTheRightPort + "/" + dbDir.getPath() + "/" + ;
		try {
			DatabaseTypeUtils.createDatabaseType(dbUrl);
finally {
		}
	}
New to GrepCode? Check out our FAQ X