Code example for Column

Methods: equalsgetCanonicalName

0
 
	public void testScalePrecisionLength() { 
 
		Table table = getTable( identifier( "basic" ) );
 
		Column nameCol = table.getColumn( new Column( identifier( "name" ) ) );
		assertEquals( nameCol.getLength(), 20 );
		assertEquals( nameCol.getPrecision(), Column.DEFAULT_PRECISION );
		assertEquals( nameCol.getScale(), Column.DEFAULT_SCALE );
	} 
 
	/* 
	 * public void testGetTables() { 
	 *  
	 * Table table = new Table(); table.setName("dummy"); cfg.addTable(table); 
	 *  
	 * Table foundTable = cfg.getTable(null,null,"dummy"); 
	 *  
	 * assertSame(table,foundTable); 
	 *  
	 * foundTable = cfg.getTable(null,"dschema", "dummy"); 
	 *  
	 * assertNotSame(table, foundTable); } 
	 */ 
 
	public void testCompositeKeys() { 
 
		Table table = getTable( identifier( "multikeyed" ) );
 
		PrimaryKey primaryKey = table.getPrimaryKey();
 
		assertEquals( 2, primaryKey.getColumnSpan() );
	} 
 
	public static Test suite() {
		return new TestSuite( BasicTest.class );
	} 
 
}