Examples of StubChangeScript


Examples of com.dbdeploy.scripts.StubChangeScript

  @Test
  public void shouldApplyChangeScriptBySplittingContentUsingTheSplitter() throws Exception {
        when(splitter.split("split; content")).thenReturn(Arrays.asList("split", "content"));

    applier.applyChangeScript(new StubChangeScript(1, "script", "split; content"));
   
    verify(queryExecuter).execute("split");
    verify(queryExecuter).execute("content");
  }
View Full Code Here

Examples of com.dbdeploy.scripts.StubChangeScript

  }

  @Test
  public void shouldRethrowSqlExceptionsWithInformationAboutWhatStringFailed() throws Exception {
    when(splitter.split("split; content")).thenReturn(Arrays.asList("split", "content"));
    ChangeScript script = new StubChangeScript(1, "script", "split; content");

    doThrow(new SQLException("dummy exception")).when(queryExecuter).execute("split");

    try {
      applier.applyChangeScript(script);
View Full Code Here

Examples of com.dbdeploy.scripts.StubChangeScript

  private void runIntegratedTestAndConfirmOutputResults(String syntaxName) throws Exception {

    StringWriter writer = new StringWriter();

    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);

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.