1 package net.sourceforge.addam.ddlgen.generic; 2 3 import net.sourceforge.addam.ddlgen.generic.TableColumn; 4 import junit.framework.TestCase; 5 6 /** 7 * User: mkrishna 8 * Date: Nov 19, 2004 9 */ 10 public class TableColumnUTEST extends TestCase { 11 private TableColumn column; 12 13 public void testGetTab() { 14 column = new TableColumn("name", "type", "size", "precision", "defaultValue"); 15 assertEquals(46, column.getTab().length()); 16 } 17 18 public void testGetDescription() { 19 column = new TableColumn("name", "type", "size", "precision", "defaultValue"); 20 assertEquals("type(size)", column.getDescription()); 21 22 column = new TableColumn("name", "NUMBER", "size", "precision", "defaultValue"); 23 assertEquals("NUMBER(size,precision)", column.getDescription()); 24 25 column = new TableColumn("name", "DATE", "size", "precision", "defaultValue"); 26 assertEquals("DATE", column.getDescription()); 27 28 column = new TableColumn("name", "datetime", "size", "precision", "defaultValue"); 29 assertEquals("datetime", column.getDescription()); 30 31 column = new TableColumn("name", "int", "size", "precision", "defaultValue"); 32 assertEquals("int", column.getDescription()); 33 34 column = new TableColumn("name", "bigint", "size", "precision", "defaultValue"); 35 assertEquals("bigint", column.getDescription()); 36 37 column = new TableColumn("name", "image", "size", "precision", "defaultValue"); 38 assertEquals("image", column.getDescription()); 39 40 column = new TableColumn("name", "bit", "size", "precision", "defaultValue"); 41 assertEquals("bit", column.getDescription()); 42 43 column = new TableColumn("name", "LONG RAW", "size", "precision", "defaultValue"); 44 assertEquals("LONG RAW", column.getDescription()); 45 46 column = new TableColumn("name", "BLOB", "size", "precision", "defaultValue"); 47 assertEquals("BLOB", column.getDescription()); 48 49 } 50 }