private static EvolutionResult<DoubleGene, Double> result( final int min, final int max, final Optimize opt ) { return EvolutionResult.of( opt, population(min, max), 2L, EvolutionDurations.ZERO, 1, 1, 1 ); }
@Test(dataProvider = "testData") public void testMaximum( final Double threshold, final Integer min, final Integer max, final Optimize opt, final Boolean result ) { final FitnessThresholdLimit<Double> limit = new FitnessThresholdLimit<>(threshold); limit.test(result(min, max, opt)); Assert.assertEquals( limit.test(result(min, max, opt)), result.booleanValue() ); }