Search in sources :

Example 1 with MigrationRunner

use of org.mamute.migration.MigrationRunner in project mamute by caelum.

the class MigrationRunnerTest method setup.

@Before
public void setup() throws IOException {
    executor = mock(MigrationExecutor.class);
    m1 = mock(SchemaMigration.class);
    m2 = mock(SchemaMigration.class);
    extractor = mock(NumberExtractor.class);
    when(extractor.from(m1)).thenReturn(1);
    when(extractor.from(m2)).thenReturn(2);
    runner = new MigrationRunner(asList(m1, m2), extractor, executor, new DefaultEnvironment(PRODUCTION));
}
Also used : DefaultEnvironment(br.com.caelum.vraptor.environment.DefaultEnvironment) MigrationRunner(org.mamute.migration.MigrationRunner) MigrationExecutor(org.mamute.migration.MigrationExecutor) SimpleSchemaMigration(org.mamute.migration.SimpleSchemaMigration) SchemaMigration(org.mamute.migration.SchemaMigration) NumberExtractor(org.mamute.migration.NumberExtractor) Before(org.junit.Before)

Aggregations

DefaultEnvironment (br.com.caelum.vraptor.environment.DefaultEnvironment)1 Before (org.junit.Before)1 MigrationExecutor (org.mamute.migration.MigrationExecutor)1 MigrationRunner (org.mamute.migration.MigrationRunner)1 NumberExtractor (org.mamute.migration.NumberExtractor)1 SchemaMigration (org.mamute.migration.SchemaMigration)1 SimpleSchemaMigration (org.mamute.migration.SimpleSchemaMigration)1