Search in sources :

Example 1 with Generate

use of org.obeonetwork.dsl.database.compare.tests.gen.main.Generate in project InformationSystem by ObeoNetwork.

the class AbstractDatabaseCompareTest method testDatabaseCompare.

public void testDatabaseCompare(String folder) {
    TableContainer tableContainer1 = (TableContainer) loadRootObject(folder, INPUT_DATABASE_1, TableContainer.class);
    TableContainer tableContainer2 = (TableContainer) loadRootObject(folder, INPUT_DATABASE_2, TableContainer.class);
    // Comparison expectedSnapshot = (Comparison)loadRootObject(folder, EXPECTED_COMPARISON, Comparison.class);
    Comparison actualSnapshot = null;
    try {
        actualSnapshot = DatabaseCompareService.compare(tableContainer1, tableContainer2);
    } catch (Exception e) {
        Assert.fail("Exception during comparison : " + e.getMessage());
    }
    try {
        Generate generate = new Generate(actualSnapshot, new File("models/" + folder), new ArrayList<Object>());
        generate.doGenerate(new BasicMonitor());
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}
Also used : Comparison(org.eclipse.emf.compare.Comparison) TableContainer(org.obeonetwork.dsl.database.TableContainer) Generate(org.obeonetwork.dsl.database.compare.tests.gen.main.Generate) EObject(org.eclipse.emf.ecore.EObject) IOException(java.io.IOException) File(java.io.File) BasicMonitor(org.eclipse.emf.common.util.BasicMonitor) IOException(java.io.IOException)

Aggregations

File (java.io.File)1 IOException (java.io.IOException)1 BasicMonitor (org.eclipse.emf.common.util.BasicMonitor)1 Comparison (org.eclipse.emf.compare.Comparison)1 EObject (org.eclipse.emf.ecore.EObject)1 TableContainer (org.obeonetwork.dsl.database.TableContainer)1 Generate (org.obeonetwork.dsl.database.compare.tests.gen.main.Generate)1