Search in sources :

Example 6 with DefaultEnvironment

use of br.com.caelum.vraptor.environment.DefaultEnvironment 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)6 EnvironmentType (br.com.caelum.vraptor.environment.EnvironmentType)4 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 Test (org.junit.Test)2 QuestionBuilder (org.mamute.builder.QuestionBuilder)2 QuestionRssEntryFactory (org.mamute.infra.rss.write.QuestionRssEntryFactory)2 Question (org.mamute.model.Question)2 Environment (br.com.caelum.vraptor.environment.Environment)1 IOException (java.io.IOException)1 URL (java.net.URL)1 Before (org.junit.Before)1 BeforeClass (org.junit.BeforeClass)1 RssFeedFactory (org.mamute.infra.rss.write.RssFeedFactory)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 User (org.mamute.model.User)1 MamuteDatabaseConfiguration (org.mamute.providers.MamuteDatabaseConfiguration)1