View Javadoc
1   package org.melati.poem.test;
2   
3   import org.melati.poem.Capability;
4   import org.melati.poem.DeletionIntegrityPoemException;
5   import org.melati.poem.TableInfo;
6   import org.melati.poem.TableRenamePoemException;
7   
8   /**
9    * @author timp
10   *
11   */
12  public class TableInfoTest extends PoemTestCase {
13  
14    public TableInfoTest(String name) {
15      super(name);
16    }
17  
18    protected void setUp() throws Exception {
19      super.setUp();
20    }
21  
22    protected void tearDown() throws Exception {
23      super.tearDown();
24    }
25  
26    /**
27     * Test method for {@link org.melati.poem.TableInfo#assertCanRead(org.melati.poem.AccessToken)}.
28     */
29    public void testAssertCanReadAccessToken() {
30      
31    }
32  
33    /**
34     * Test method for {@link org.melati.poem.TableInfo#setName(java.lang.String)}.
35     */
36    public void testSetName() {
37      try {
38        getDb().getUserTable().getTableInfo().setName("newname");
39        fail("Should have blown up");
40      } catch (TableRenamePoemException e) {
41        e = null;
42      }
43    }
44  
45    /**
46     * Test method for {@link org.melati.poem.TableInfo#setCachelimit(java.lang.Integer)}.
47     */
48    public void testSetCachelimitInteger() {
49      
50    }
51  
52    /**
53     * Test method for {@link org.melati.poem.TableInfo#setSeqcached(java.lang.Boolean)}.
54     */
55    public void testSetSeqcachedBoolean() {
56      
57    }
58  
59    /**
60     * Test method for {@link org.melati.poem.TableInfo#TableInfo()}.
61     */
62    public void testTableInfo() {
63      
64    }
65  
66    /**
67     * Test method for {@link org.melati.poem.TableInfo#actualTable()}.
68     */
69    public void testActualTable() {
70      
71    }
72  
73    /**
74     * Test method for {@link org.melati.poem.TableInfo#TableInfo(org.melati.poem.Table)}.
75     */
76    public void testTableInfoTable() {
77      
78    }
79  
80    /**
81     * Test that the 'clear' integrityfix works.
82     */
83    public void testClearIntegrityFix() {
84      Capability c = getDb().getCapabilityTable().ensure("tableInfoReading");
85      getDb().getUserTable().getTableInfo().setDefaultcanread(c);
86      assertEquals("tableInfoReading", 
87              getDb().getUserTable().getTableInfo().getDefaultcanread().getName());
88      c.delete();
89      assertNull(getDb().getUserTable().getTableInfo().getDefaultcanread());
90      
91    }
92  
93    public void testDeleteMap() {
94      TableInfo ti = getDb().getUserTable().getTableInfo();
95      try {
96        ti.delete();
97        fail("Should have bombed");
98      } catch (DeletionIntegrityPoemException e) {
99        e = null;
100     }
101   }
102 }