01: package liquibase.database;
02:
03: import static org.junit.Assert.*;
04: import org.junit.Test;
05:
06: public class CacheDatabaseTest extends AbstractDatabaseTest {
07:
08: public CacheDatabaseTest() throws Exception {
09: super (new CacheDatabase());
10: }
11:
12: protected String getProductNameString() {
13: return "Cache";
14: }
15:
16: @Test
17: public void supportsSequences() {
18: assertFalse(database.supportsSequences());
19: }
20:
21: @Test
22: public void getFalseBooleanValue() {
23: assertEquals("0", database.getFalseBooleanValue());
24: }
25:
26: @Test
27: public void getTrueBooleanValue() {
28: assertEquals("1", database.getTrueBooleanValue());
29: }
30:
31: @Test
32: public void getLineComment() {
33: assertEquals("--", database.getLineComment());
34: }
35:
36: @Test
37: public void getDefaultDriver() {
38: assertEquals(
39: "com.intersys.jdbc.CacheDriver",
40: database
41: .getDefaultDriver("jdbc:Cache://127.0.0.1:56773/TESTMIGRATE"));
42: }
43:
44: @Test
45: public void getProductName() {
46: assertEquals(getProductNameString(), database.getProductName());
47: }
48:
49: @Test
50: public void getTypeName() {
51: assertEquals("cache", database.getTypeName());
52: }
53:
54: @Test
55: public void getDateType() {
56: assertEquals("DATE", database.getDateType());
57: }
58:
59: @Test
60: public void getBlobType() {
61: assertEquals("LONGVARBINARY", database.getBlobType());
62:
63: }
64:
65: @Test
66: public void getBooleanType() {
67: assertEquals("INTEGER", database.getBooleanType());
68: }
69:
70: @Test
71: public void getClobType() {
72: assertEquals("LONGVARCHAR", database.getClobType());
73: }
74:
75: @Test
76: public void getCurrencyType() {
77: assertEquals("MONEY", database.getCurrencyType());
78: }
79:
80: @Test
81: public void getCurrentDateTimeFunction() {
82: assertEquals("SYSDATE", database.getCurrentDateTimeFunction());
83: }
84:
85: @Test
86: public void getDateTimeType() {
87: assertEquals("DATETIME", database.getDateTimeType());
88: }
89:
90: @Test
91: public void getUUIDType() {
92: assertEquals("CHAR(36)", database.getUUIDType());
93: }
94:
95: @Test
96: public void supportsInitiallyDeferrableColumns() {
97: assertFalse(database.supportsInitiallyDeferrableColumns());
98: }
99: }
|