@Test public void requireThatInvalidMaxWaitAfterCoverageFactorCanNotBeSet() { SearchCoverage.Builder coverage = new SearchCoverage.Builder(); coverage.setMaxWaitAfterCoverageFactor(0.5); assertEquals(0.5, coverage.build().getMaxWaitAfterCoverageFactor(), 1E-6); try { coverage.setMaxWaitAfterCoverageFactor(-0.5); fail(); } catch (IllegalArgumentException e) { assertEquals("Expected value in range [0, 1], got -0.5.", e.getMessage()); } assertEquals(0.5, coverage.build().getMaxWaitAfterCoverageFactor(), 1E-6); try { coverage.setMaxWaitAfterCoverageFactor(1.5); fail(); } catch (IllegalArgumentException e) { assertEquals("Expected value in range [0, 1], got 1.5.", e.getMessage()); } assertEquals(0.5, coverage.build().getMaxWaitAfterCoverageFactor(), 1E-6); }
public Double getMaxWaitAfterCoverageFactor() { return maxWaitAfterCoverageFactor; }
SearchCoverage { public Double getMaxWaitAfterCoverageFactor() { return maxWaitAfterCoverageFactor; } }
SearchCoverage { public Double getMaxWaitAfterCoverageFactor() { return maxWaitAfterCoverageFactor; } private  SearchCoverage(Builder builder); }
SearchCoverage { public Double getMaxWaitAfterCoverageFactor() { return maxWaitAfterCoverageFactor; } private  SearchCoverage(Builder builder); Double getMinimum(); Double getMinWaitAfterCoverageFactor(); Double getMaxWaitAfterCoverageFactor(); }
SearchCoverage { public Double getMaxWaitAfterCoverageFactor() { return maxWaitAfterCoverageFactor; } private  SearchCoverage(Builder builder); Double getMinimum(); Double getMinWaitAfterCoverageFactor(); Double getMaxWaitAfterCoverageFactor();  }