1 package org.apache.torque.engine.platform; 2 3 18 19 import junit.framework.TestCase; 20 21 import org.apache.torque.engine.database.model.Domain; 22 import org.apache.torque.engine.database.model.SchemaType; 23 24 28 public class PlatformMysqlImplTest extends TestCase { 29 30 Platform platform; 31 32 public void setUp() 33 { 34 platform = PlatformFactory.getPlatformFor("mysql"); 35 } 36 37 public void testGetMaxColumnNameLength() { 38 assertEquals(64, platform.getMaxColumnNameLength()); 39 } 40 41 public void testGetNativeIdMethod() { 42 assertEquals("identity", platform.getNativeIdMethod()); 43 } 44 45 public void testGetDomainForJdbcType() { 46 Domain numeric = platform.getDomainForSchemaType(SchemaType.NUMERIC); 47 assertEquals(SchemaType.NUMERIC, numeric.getType()); 48 assertEquals("DECIMAL", numeric.getSqlType()); 49 } 50 51 } 52 | Popular Tags |