1 package org.melati.poem.test;
2
3
4 import org.melati.poem.Database;
5
6 import junit.framework.Test;
7
8
9
10
11
12
13
14 public abstract class EverythingTestCase extends PoemTestCase implements Test {
15
16
17 public static final String databaseName = "everything";
18
19
20
21
22 public EverythingTestCase() {
23 super();
24 }
25
26 public EverythingTestCase(String name) {
27 super(name);
28 }
29
30
31
32
33 public Database getDb() {
34 return getDb(databaseName);
35 }
36
37
38
39 public String getDatabaseName() {
40 return databaseName;
41 }
42
43 protected void databaseUnchanged() {
44 assertEquals("Setting changed",0, getDb().getSettingTable().count());
45 assertEquals("Group changed", 1, getDb().getGroupTable().count());
46 assertEquals("GroupMembership changed", 1, getDb().getGroupMembershipTable().count());
47 assertEquals("Capability changed", 5, getDb().getCapabilityTable().count());
48 assertEquals("GroupCapability changed", 1, getDb().getGroupCapabilityTable().count());
49 assertEquals("TableCategory changed", 4, getDb().getTableCategoryTable().count());
50 assertEquals("User changed", 2, getDb().getUserTable().count());
51
52
53 if (getDb().getDbms().canDropColumns()) {
54 assertEquals("ColumnInfo changed", 161, getDb().getColumnInfoTable().count());
55 assertEquals("TableInfo changed", 25, getDb().getTableInfoTable().count());
56 checkTables(25);
57 }
58 }
59
60
61 }