View Javadoc
1   package de.dlr.shepard.migrations.neo4j;
2   
3   import de.dlr.shepard.common.neo4j.MigrationsRunner;
4   
5   /**
6    * Class to implement for all the test methods of a complex migration test.
7    * This can be subclassed to avoid polluting the namespace of the main test runner.
8    * All the respective helper methods and fields can be encapsulated here.
9    */
10  abstract class MigrationTest {
11  
12    static final QueryHelper q = new QueryHelper();
13    final SampleNodeCreator sample = new SampleNodeCreator(getTargetVersion());
14  
15    abstract void setupPreMigrationData() throws Exception;
16  
17    abstract String getTargetVersion();
18  
19    void runMigration() {
20      new MigrationsRunner(getTargetVersion()).apply();
21    }
22  
23    abstract void cleanup();
24  }