Source:
<code><START> private void checkImportedModel(){ <END> new ModelExplorer().openModelEditor(WORK_PROJECT_NAME, NAME_VIEW_MODEL + ".xmi"); RelationalModelEditor editor = new RelationalModelEditor(NAME_VIEW_MODEL + ".xmi"); TableEditor tableEditor = editor.openTableEditor(); tableEditor.openTab(TableEditor.Tabs.FOREIGN_KEYS); collector.checkThat("Foreign key 1 name in source is badly set", tableEditor.getCellText(1,"ForeignKey1", "Name In Source"), is("ForeignKey1Source")); collector.checkThat("Foreign key 2 name in source is badly set", tableEditor.getCellText(1,"ForeignKey2", "Name In Source"), is("ForeignKey2Source")); collector.checkThat("Column of Foreign key 1 is badly set", tableEditor.getCellText(1,"ForeignKey1", "Columns"), is("fk_Column1 : string(4000)")); collector.checkThat("Column of Foreign key 2 is badly set", tableEditor.getCellText(1,"ForeignKey2", "Columns"), is("fk_Column2 : string(4000)")); collector.checkThat("Unique Key of Foreign key 1 is badly set", tableEditor.getCellText(1,"ForeignKey1", "Unique Key"), containsString("PrimaryKey")); collector.checkThat("Unique Key of Foreign key 2 is badly set", tableEditor.getCellText(1,"ForeignKey2", "Unique Key"), containsString("UniqueConstraint")); ProblemsView problemsView = new ProblemsView(); collector.checkThat("Errors in imported source model", problemsView.getProblems(ProblemType.ERROR, new ProblemsResourceMatcher(NAME_VIEW_MODEL + ".xmi")), empty()); collector.checkThat("Errors in imported VDB", problemsView.getProblems(ProblemType.ERROR, new ProblemsResourceMatcher(NAME_VDB + ".vdb")), empty()); }</code><technical_language>This method a copy of SourceForeignKey.checkImportedModel()</technical_language>

Target:
private void checkImportedModel(){ new ModelExplorer().openModelEditor(WORK_PROJECT_NAME, NAME_VIEW_MODEL + ".xmi"); RelationalModelEditor editor = new RelationalModelEditor(NAME_VIEW_MODEL + ".xmi"); TableEditor tableEditor = editor.openTableEditor(); tableEditor.openTab(TableEditor.Tabs.FOREIGN_KEYS); collector.checkThat("Foreign key 1 name in source is badly set", tableEditor.getCellText(1,"ForeignKey1", "Name In Source"), is("ForeignKey1Source")); collector.checkThat("Foreign key 2 name in source is badly set", tableEditor.getCellText(1,"ForeignKey2", "Name In Source"), is("ForeignKey2Source")); collector.checkThat("Column of Foreign key 1 is badly set", tableEditor.getCellText(1,"ForeignKey1", "Columns"), is("fk_Column1 : string(4000)")); collector.checkThat("Column of Foreign key 2 is badly set", tableEditor.getCellText(1,"ForeignKey2", "Columns"), is("fk_Column2 : string(4000)")); collector.checkThat("Unique Key of Foreign key 1 is badly set", tableEditor.getCellText(1,"ForeignKey1", "Unique Key"), containsString("PrimaryKey")); collector.checkThat("Unique Key of Foreign key 2 is badly set", tableEditor.getCellText(1,"ForeignKey2", "Unique Key"), containsString("UniqueConstraint")); ProblemsView problemsView = new ProblemsView(); collector.checkThat("Errors in imported view model", problemsView.getProblems(ProblemType.ERROR, new ProblemsResourceMatcher(NAME_VIEW_MODEL + ".xmi")), empty()); collector.checkThat("Errors in imported VDB", problemsView.getProblems(ProblemType.ERROR, new ProblemsResourceMatcher(NAME_VDB + ".vdb")), empty()); }