Package org.rssowl.core.internal.persist.migration.Migrations

Examples of org.rssowl.core.internal.persist.migration.Migrations.ChainedMigration


  @Test
  public void testGetMigration() {
    Migrations migrations = new Migrations(new MigrationImpl(1, 2), new MigrationImpl(2, 3), new MigrationImpl(3, 4));
    Migration migration = migrations.getMigration(2, 4);
    assertEquals(ChainedMigration.class, migration.getClass());
    ChainedMigration chainedMigration = (ChainedMigration) migration;

    assertEquals(2, chainedMigration.getMigrations().size());
    assertEquals(migrations.getMigrations().get(1), chainedMigration.getMigrations().get(0));

    migration = migrations.getMigration(2, 3);
    assertFalse(migration instanceof ChainedMigration);
    assertEquals(migrations.getMigrations().get(1), migration);
  }
View Full Code Here


        new MigrationImpl(7, 8), new MigrationImpl(8, 9), new MigrationImpl(6, 8));

    Migration migration = migrations.getMigration(2, 8);

    assertEquals(ChainedMigration.class, migration.getClass());
    ChainedMigration chainedMigration = (ChainedMigration) migration;
    assertEquals(3, chainedMigration.getMigrations().size());
    assertEquals(migrations.getMigrations().get(5), chainedMigration.getMigrations().get(0));
    assertEquals(migrations.getMigrations().get(3), chainedMigration.getMigrations().get(1));
    assertEquals(migrations.getMigrations().get(10), chainedMigration.getMigrations().get(2));
  }
View Full Code Here

TOP

Related Classes of org.rssowl.core.internal.persist.migration.Migrations.ChainedMigration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.