Package src

Examples of src.Migrator


import src.UsuarioMigration;

public class UsuarioMigrationTest extends TestCase {

  public void testGetResultSet() throws Exception {
    Migrator migration = new UsuarioMigration(
        Context.getSourceConnection(), Context
            .getDestinationConnection());
    ResultSet rs = migration.getResultSet();

    rs.next();
    assertEquals(30, rs.getMetaData().getColumnCount());
  }
View Full Code Here


    rs.next();
    assertEquals(30, rs.getMetaData().getColumnCount());
  }

  public void testExecute() throws Exception {
    Migrator migration = new UsuarioMigration(
        Context.getSourceConnection(), Context
            .getDestinationConnection());
    ResultSet rs = migration.getResultSet();
    rs.next();

    migration.execute(rs);

    Statement stm = (Statement) Context.getDestinationConnection()
        .createStatement();
    ResultSet rs2 = (ResultSet) stm
        .executeQuery("SELECT id, nome FROM USUARIO WHERE id = "
View Full Code Here

import src.Migrator;

public class InscricaoMigrationTest extends TestCase {

  public void testGetResultSet() throws Exception {
    Migrator migration = new InscricaoMigration(Context.getSourceConnection(),Context.getDestinationConnection());
    ResultSet rs = migration.getResultSet();
   
    rs.next();
    assertEquals(6,rs.getMetaData().getColumnCount());
  }
View Full Code Here

    rs.next();
    assertEquals(6,rs.getMetaData().getColumnCount());
  }

  public void testExecute() throws Exception {
    Migrator migration = new InscricaoMigration(Context.getSourceConnection(),Context.getDestinationConnection());
    ResultSet rs = migration.getResultSet();
    rs.next();
   
    migration.execute(rs);
   
    Statement stm = (Statement) Context.getDestinationConnection().createStatement();
    ResultSet rs2 = (ResultSet) stm.executeQuery("SELECT id FROM INSCRICAO WHERE id = " + rs.getLong(1));
    rs2.next();
   
View Full Code Here

import src.VisitaMigration;

public class VisitaMigrationTest extends TestCase {
 
  public void testGetResultSet() throws Exception {
    Migrator migration = new VisitaMigration(Context.getSourceConnection(),Context.getDestinationConnection());
    ResultSet rs = migration.getResultSet();
   
    rs.next();
    //16 campos da tabela sem JOIN + 3 campos do JOIN
    assertEquals(19, rs.getMetaData().getColumnCount());
  }
View Full Code Here

    //16 campos da tabela sem JOIN + 3 campos do JOIN
    assertEquals(19, rs.getMetaData().getColumnCount());
  }
 
  public void testExecute() throws Exception {
    Migrator migration = new VisitaMigration(Context.getSourceConnection(),Context.getDestinationConnection());
    ResultSet rs = migration.getResultSet();
    rs.next();
   
    migration.execute(rs);
   
    Statement stm = (Statement) Context.getDestinationConnection().createStatement();
    ResultSet rs2 = (ResultSet) stm.executeQuery("SELECT id FROM VISITA WHERE id = " + rs.getLong(1));
    rs2.next();
   
View Full Code Here

import src.Migrator;

public class ConteudoMigrationTest extends TestCase {
 
  public void testGetResultSet() throws Exception {
    Migrator migration = new ConteudoMigration(Context.getSourceConnection(),Context.getDestinationConnection());
    ResultSet rs = migration.getResultSet();
   
    rs.next();
    assertEquals(7,rs.getMetaData().getColumnCount());
  }
View Full Code Here

    rs.next();
    assertEquals(7,rs.getMetaData().getColumnCount());
  }
 
  public void testExecute() throws Exception {
    Migrator migration = new ConteudoMigration(Context.getSourceConnection(),Context.getDestinationConnection());
    ResultSet rs = migration.getResultSet();
    rs.next();
   
    migration.execute(rs);
   
    Statement stm = (Statement) Context.getDestinationConnection().createStatement();
    ResultSet rs2 = (ResultSet) stm.executeQuery("SELECT id FROM CONTEUDO WHERE id = " + rs.getLong(1));
    rs2.next();
   
View Full Code Here

import junit.framework.TestCase;

public class CursoMigrationTest extends TestCase {

  public void testGetResultSet() throws Exception {
    Migrator migration = new CursoMigration(Context.getSourceConnection(),
        Context.getDestinationConnection());
    ResultSet rs = migration.getResultSet();

    rs.next();
    assertEquals(9, rs.getMetaData().getColumnCount());
  }
View Full Code Here

    rs.next();
    assertEquals(9, rs.getMetaData().getColumnCount());
  }

  public void testExecute() throws Exception {
    Migrator migration = new CursoMigration(Context.getSourceConnection(),
        Context.getDestinationConnection());
    ResultSet rs = migration.getResultSet();
    rs.next();

    migration.execute(rs);

    Statement stm = (Statement) Context.getDestinationConnection()
        .createStatement();
    ResultSet rs2 = (ResultSet) stm
        .executeQuery("SELECT id FROM CURSO WHERE id = "
View Full Code Here

TOP

Related Classes of src.Migrator

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.