assertEquals( result.getExitStatus(), CommandExecutorCodes.Kitchen.COULD_NOT_LOAD_JOB.getCode() );
return exitWithStatus( CommandExecutorCodes.Kitchen.COULD_NOT_LOAD_JOB.getCode() ); } catch ( Exception e ) { System.out.println( Const.getStackTracker( e ) ); return exitWithStatus( CommandExecutorCodes.Kitchen.UNEXPECTED_ERROR.getCode() ); int returnCode = CommandExecutorCodes.Kitchen.SUCCESS.getCode(); return exitWithStatus( CommandExecutorCodes.Kitchen.COULD_NOT_LOAD_JOB.getCode() ); // same as the other list options returnCode = CommandExecutorCodes.Kitchen.ERRORS_DURING_PROCESSING.getCode();
assertEquals( result.getExitStatus(), CommandExecutorCodes.Kitchen.COULD_NOT_LOAD_JOB.getCode() );
assertEquals( result.getExitStatus(), CommandExecutorCodes.Kitchen.COULD_NOT_LOAD_JOB.getCode() );
Kitchen( int code, String description ) { setCode( code ); setDescription( description ); }
public int printVersion() { printVersion( "Kitchen.Log.KettleVersion" ); return CommandExecutorCodes.Kitchen.KETTLE_VERSION_PRINT.getCode(); }
@Test public void testKitchenStatusCodes() throws Exception { assertNull( CommandExecutorCodes.Kitchen.getByCode( 9999 ) ); assertNotNull( CommandExecutorCodes.Kitchen.getByCode( 0 ) ); assertEquals( CommandExecutorCodes.Kitchen.UNEXPECTED_ERROR, CommandExecutorCodes.Kitchen.getByCode( 2 ) ); assertEquals( CommandExecutorCodes.Kitchen.CMD_LINE_PRINT, CommandExecutorCodes.Kitchen.getByCode( 9 ) ); assertEquals( "The job ran without a problem", CommandExecutorCodes.Kitchen.getByCode( 0 ).getDescription() ); assertEquals( "The job couldn't be loaded from XML or the Repository", CommandExecutorCodes.Kitchen.getByCode( 7 ).getDescription() ); assertTrue( CommandExecutorCodes.Kitchen.isFailedExecution( CommandExecutorCodes.Kitchen.COULD_NOT_LOAD_JOB.getCode() ) ); assertTrue( CommandExecutorCodes.Kitchen.isFailedExecution( CommandExecutorCodes.Kitchen.ERROR_LOADING_STEPS_PLUGINS.getCode() ) ); assertFalse( CommandExecutorCodes.Kitchen.isFailedExecution( CommandExecutorCodes.Kitchen.SUCCESS.getCode() ) ); assertFalse( CommandExecutorCodes.Kitchen.isFailedExecution( CommandExecutorCodes.Kitchen.ERRORS_DURING_PROCESSING.getCode() ) ); }