String sql = SqlGenerator.generateQueryForId(id, clazz, schema); String currentColumn = null; try {
String sql = SqlGenerator.generateQueryForId(id, clazz, schema); String currentColumn = null; try {
public void testInvalidClassForGetById() throws Exception { try { SqlGenerator.generateQueryForId(new Integer(5), SqlGeneratorTest.class, getSchema()); fail("Expected: ObjectStoreException"); } catch (ObjectStoreException e) { assertEquals("class org.intermine.objectstore.intermine.SqlGeneratorTest is not in the model", e.getMessage()); } try { SqlGenerator.tableNameForId(SqlGeneratorTest.class, getSchema()); fail("Expected: ObjectStoreException"); } catch (ObjectStoreException e) { assertEquals("class org.intermine.objectstore.intermine.SqlGeneratorTest is not in the model", e.getMessage()); } } }
public void testInvalidClassForGetById() throws Exception { try { SqlGenerator.generateQueryForId(new Integer(5), SqlGeneratorTest.class, getSchema()); fail("Expected: ObjectStoreException"); } catch (ObjectStoreException e) { assertEquals("class org.intermine.objectstore.intermine.SqlGeneratorTest is not in the model", e.getMessage()); } try { SqlGenerator.tableNameForId(SqlGeneratorTest.class, getSchema()); fail("Expected: ObjectStoreException"); } catch (ObjectStoreException e) { assertEquals("class org.intermine.objectstore.intermine.SqlGeneratorTest is not in the model", e.getMessage()); } } }