this.torqueTableGenerator = null;
}
public void testGenerateStandardTables() {
StringBuffer buffer = new StringBuffer();
TableDescriptor tableDescriptor = new TableDescriptor();
this.torqueTableGenerator.generateStandardTable(tableDescriptor, buffer, "JUnit indx");
assertEquals(EMPTY_STANDARD_TABLE, buffer.toString());
buffer = new StringBuffer();
tableDescriptor.setName("PERSON_PROJECT");
ClassDescriptor classDescriptor = this.repository.getDescriptorFor(org.apache.ojb.odmg.shared.ProductGroup.class);
FieldDescriptor fieldDescriptors[] = classDescriptor.getFieldDescriptions();
for (int i = 0; i < fieldDescriptors.length; i++) {
tableDescriptor.addColumn(fieldDescriptors[i]);
}
tableDescriptor.setIndices(classDescriptor.getIndexes());
tableDescriptor.getReferences().addAll(classDescriptor.getObjectReferenceDescriptors());
this.torqueTableGenerator.generateStandardTable(tableDescriptor, buffer, "JUnit indx");
assertEquals(PERSON_PROJECT_TABLE, buffer.toString());
}