use of org.alfresco.util.schemacomp.model.ForeignKey in project alfresco-repository by Alfresco.
the class DbObjectXMLTransformerTest method transformForeignKey.
@Test
public void transformForeignKey() throws IOException {
ForeignKey fk = new ForeignKey(null, "fk_for_some_table", "local_column", "target_table", "target_column");
transformer.output(fk);
BufferedReader reader = new BufferedReader(new StringReader(writer.toString()));
dumpOutput();
assertHasPreamble(reader);
assertEquals("<foreignkey name=\"fk_for_some_table\">", reader.readLine());
assertEquals(" <localcolumn>local_column</localcolumn>", reader.readLine());
assertEquals(" <targettable>target_table</targettable>", reader.readLine());
assertEquals(" <targetcolumn>target_column</targetcolumn>", reader.readLine());
assertEquals("</foreignkey>", reader.readLine());
}
Aggregations