01: /*
02: * User: Michael Rettig
03: * Date: Sep 15, 2002
04: * Time: 3:59:01 PM
05: */
06: package net.sourceforge.jaxor.parser.tests;
07:
08: import net.sourceforge.jaxor.MetaRow;
09: import net.sourceforge.jaxor.example.domain.AddressMetaRow;
10: import net.sourceforge.jaxor.example.tests.TableTestCase;
11: import net.sourceforge.jaxor.parser.ColumnChecker;
12: import net.sourceforge.jaxor.util.Validation;
13:
14: public class ColumnCheckerTest extends TableTestCase {
15:
16: protected MetaRow getRow() {
17: return new AddressMetaRow();
18: }
19:
20: public void testTask() {
21: ColumnChecker checker = new ColumnChecker();
22: MetaRow row = checker.getMetaRowForClass(AddressMetaRow.class
23: .getName()
24: + ".class");
25: boolean useCaps = getTestingContext()
26: .capitalizeTableNameForMetaData();
27: Validation val = row.validateColumns(getConnection(), useCaps);
28: assertTrue(val.getMessages().toString(), !val.hasErrors());
29: }
30:
31: }
|