1 package org.apache.torque.engine.platform;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 /***
25 * @author <a href="mailto:mpoeschl@marmot.at">Martin Poeschl</a>
26 * @version $Id: PlatformMysqlImplTest.java 239626 2005-08-24 12:19:51Z henning $
27 */
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 }