@Test public void testInitBadParameterNegative() throws Exception { String classname = "classname"; String parameter = "-2"; int response = underTest.init(classname, parameter, environment); Assert.assertTrue(response == -2); }
@Override public int init(final String testClassName, final String parameter, final Environment environment) { this.environment = environment; int returnValue = 0; try { multiplier = Integer.valueOf(parameter); if (multiplier <= 0) { returnValue = INIT_FAILED_WITH_PARAMETER_ERROR; } arrayLoader = new SimpleMultiplierDataFeederFileLoader(); } catch (NumberFormatException e) { returnValue = INIT_FAILED_WITH_INVALID_PARAMETER; } return returnValue; }
SimpleMultiplierDataFeeder implements GepardDataFeeder { @Override public int init(final String testClassName, final String parameter, final Environment environment) { this.environment = environment; int returnValue = 0; try { multiplier = Integer.valueOf(parameter); if (multiplier <= 0) { returnValue = INIT_FAILED_WITH_PARAMETER_ERROR; } arrayLoader = new SimpleMultiplierDataFeederFileLoader(); } catch (NumberFormatException e) { returnValue = INIT_FAILED_WITH_INVALID_PARAMETER; } return returnValue; } }
SimpleMultiplierDataFeeder implements GepardDataFeeder { @Override public int init(final String testClassName, final String parameter, final Environment environment) { this.environment = environment; int returnValue = 0; try { multiplier = Integer.valueOf(parameter); if (multiplier <= 0) { returnValue = INIT_FAILED_WITH_PARAMETER_ERROR; } arrayLoader = new SimpleMultiplierDataFeederFileLoader(); } catch (NumberFormatException e) { returnValue = INIT_FAILED_WITH_INVALID_PARAMETER; } return returnValue; }  }
SimpleMultiplierDataFeeder implements GepardDataFeeder { @Override public int init(final String testClassName, final String parameter, final Environment environment) { this.environment = environment; int returnValue = 0; try { multiplier = Integer.valueOf(parameter); if (multiplier <= 0) { returnValue = INIT_FAILED_WITH_PARAMETER_ERROR; } arrayLoader = new SimpleMultiplierDataFeederFileLoader(); } catch (NumberFormatException e) { returnValue = INIT_FAILED_WITH_INVALID_PARAMETER; } return returnValue; }  @Override int init(final String testClassName, final String parameter, final Environment environment); @Override int calculateRuns(final String className, final int inputRows); @Override DataDrivenParameterArray calculateParameterArray(final String className, final DataDrivenParameterArray inputParameterArray); }
SimpleMultiplierDataFeeder implements GepardDataFeeder { @Override public int init(final String testClassName, final String parameter, final Environment environment) { this.environment = environment; int returnValue = 0; try { multiplier = Integer.valueOf(parameter); if (multiplier <= 0) { returnValue = INIT_FAILED_WITH_PARAMETER_ERROR; } arrayLoader = new SimpleMultiplierDataFeederFileLoader(); } catch (NumberFormatException e) { returnValue = INIT_FAILED_WITH_INVALID_PARAMETER; } return returnValue; }  @Override int init(final String testClassName, final String parameter, final Environment environment); @Override int calculateRuns(final String className, final int inputRows); @Override DataDrivenParameterArray calculateParameterArray(final String className, final DataDrivenParameterArray inputParameterArray);  }