@Test public void testExecute() throws KettleJobException { MissingEntry entry = spy( new MissingEntry() ); when( entry.getLogChannel() ).thenReturn( mock( LogChannel.class ) ); entry.setName( "MissingTest" ); Result result = new Result(); result.setNrErrors( 0 ); result.setResult( true ); entry.execute( result, 0 ); assertEquals( 1, result.getNrErrors() ); assertEquals( false, result.getResult() ); }
@Override public Result execute( Result previousResult, int nr ) throws KettleJobException { previousResult.setResult( false ); previousResult.setNrErrors( previousResult.getNrErrors() + 1 ); getLogChannel().logError( BaseMessages.getString( MissingEntry.class, "MissingEntry.Log.CannotRunJob" ) ); return previousResult; }
MissingEntry extends JobEntrySpecial { @Override public Result execute( Result previousResult, int nr ) throws KettleJobException { previousResult.setResult( false ); previousResult.setNrErrors( previousResult.getNrErrors() + 1 ); getLogChannel().logError( BaseMessages.getString( MissingEntry.class, "MissingEntry.Log.CannotRunJob" ) ); return previousResult; } }
MissingEntry extends JobEntrySpecial { @Override public Result execute( Result previousResult, int nr ) throws KettleJobException { previousResult.setResult( false ); previousResult.setNrErrors( previousResult.getNrErrors() + 1 ); getLogChannel().logError( BaseMessages.getString( MissingEntry.class, "MissingEntry.Log.CannotRunJob" ) ); return previousResult; } MissingEntry();  MissingEntry( String name, String missingPluginId ); }
MissingEntry extends JobEntrySpecial { @Override public Result execute( Result previousResult, int nr ) throws KettleJobException { previousResult.setResult( false ); previousResult.setNrErrors( previousResult.getNrErrors() + 1 ); getLogChannel().logError( BaseMessages.getString( MissingEntry.class, "MissingEntry.Log.CannotRunJob" ) ); return previousResult; } MissingEntry();  MissingEntry( String name, String missingPluginId ); @Override Result execute( Result previousResult, int nr ); String getMissingPluginId(); }
MissingEntry extends JobEntrySpecial { @Override public Result execute( Result previousResult, int nr ) throws KettleJobException { previousResult.setResult( false ); previousResult.setNrErrors( previousResult.getNrErrors() + 1 ); getLogChannel().logError( BaseMessages.getString( MissingEntry.class, "MissingEntry.Log.CannotRunJob" ) ); return previousResult; } MissingEntry();  MissingEntry( String name, String missingPluginId ); @Override Result execute( Result previousResult, int nr ); String getMissingPluginId();  }