Package com.dbdeploy.scripts

Examples of com.dbdeploy.scripts.ChangeScriptRepository


    QueryExecuter queryExecuter = new QueryExecuter(url, userid, password);

    DatabaseSchemaVersionManager databaseSchemaVersionManager =
        new DatabaseSchemaVersionManager(queryExecuter, changeLogTableName);

    ChangeScriptRepository changeScriptRepository =
        new ChangeScriptRepository(new DirectoryScanner(encoding).getChangeScriptsForDirectory(scriptdirectory));

    ChangeScriptApplier doScriptApplier;

    if (outputfile != null) {
      doScriptApplier = new TemplateBasedApplier(
View Full Code Here


    ChangeScript one = new ChangeScript(1);
    ChangeScript two = new ChangeScript(2);
    ChangeScript three = new ChangeScript(3);
    ChangeScript four = new ChangeScript(4);
   
    ChangeScriptRepository repository = new ChangeScriptRepository(Arrays.asList( three, two, four, one ));
   
    List<ChangeScript> list = repository.getOrderedListOfDoChangeScripts();
    assertThat(4, equalTo(list.size()));
    assertSame(one, list.get(0));
    assertSame(two, list.get(1));
    assertSame(three, list.get(2));
    assertSame(four, list.get(3));
View Full Code Here

    ChangeScript two = new ChangeScript(2);
    ChangeScript three = new ChangeScript(3);
    ChangeScript anotherTwo = new ChangeScript(2);
   
    try {
      new ChangeScriptRepository(Arrays.asList(three, two, anotherTwo));
      fail("expected exception");
    } catch (DuplicateChangeScriptException ex) {
      assertEquals("There is more than one change script with number 2", ex.getMessage());
    }
  }
View Full Code Here

  @Test
    public void shouldAllowChangeScriptsThatStartFromZero() throws Exception {
        ChangeScript zero = new ChangeScript(0);
        ChangeScript four = new ChangeScript(4);

        ChangeScriptRepository repository = new ChangeScriptRepository(Arrays.asList( zero, four ));

        List<ChangeScript> list = repository.getOrderedListOfDoChangeScripts();
        assertThat(2, equalTo(list.size()));
        assertSame(zero, list.get(0));
        assertSame(four, list.get(1));
    }
View Full Code Here

    QueryExecuter queryExecuter = new QueryExecuter(url, userid, password);

    DatabaseSchemaVersionManager databaseSchemaVersionManager =
        new DatabaseSchemaVersionManager(queryExecuter, changeLogTableName);

    ChangeScriptRepository changeScriptRepository =
        new ChangeScriptRepository(new DirectoryScanner(encoding).getChangeScriptsForDirectory(scriptdirectory));

    ChangeScriptApplier doScriptApplier;

    if (outputfile != null) {
      doScriptApplier = new TemplateBasedApplier(
View Full Code Here

    ChangeScript changeOne = new StubChangeScript(1, "001_change.sql", "-- contents of change script 1");
    ChangeScript changeTwo = new StubChangeScript(2, "002_change.sql", "-- contents of change script 2");

    List<ChangeScript> changeScripts = Arrays.asList(changeOne, changeTwo);
    ChangeScriptRepository changeScriptRepository = new ChangeScriptRepository(changeScripts);



    final StubSchemaManager schemaManager = new StubSchemaManager();
    ChangeScriptApplier applier = new TemplateBasedApplier(writer, syntaxName, "changelog", ";", DelimiterType.normal, null);
View Full Code Here

TOP

Related Classes of com.dbdeploy.scripts.ChangeScriptRepository

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.