Package net.raymanoz.migrate

Examples of net.raymanoz.migrate.Script.execute()


  }
 
 
  private Script mockScript(long dbVersion, long patch, ScriptStatus returnedScriptStatus){
    Script result = mock(Script.class);
    when(result.execute(any(UserInteractionStrategy.class))).thenReturn(returnedScriptStatus);
    when(result.getDBVersion()).thenReturn(dbVersion);
    when(result.getPatch()).thenReturn(patch);
    return result;
  }
 
View Full Code Here


      when(script.getDBVersion()).thenReturn(dbVersion);
      when(script.getFileName()).thenReturn(scriptName);
      when(script.getPatch()).thenReturn(scriptNo);
     
      when(script.condtionStatus()).thenReturn("Test");
      when(script.execute(any(UserInteractionStrategy.class))).thenThrow(new RuntimeException("TBI"));
      when(script.compareTo(any(Script.class))).thenThrow(new RuntimeException("TBI"));
      scripts.add(script);
      when(result.get((int)scriptNo)).thenReturn(script);
    }
    when(result.iterator()).thenReturn(scripts.iterator());
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.