6667686970717273
/** * Tests whether we evaluate correctly to a 0% health if larger than maximum. */ @Test public void testLowBoundary() { HealthReport health = createHealthReport(true, 50, 150, 150); assertEquals(ERROR_MESSAGE, 0, health.getScore()); }
7576777879808182
/** * Tests whether we evaluate correctly to a 25% health. */ @Test public void test25Percent() { HealthReport health = createHealthReport(true, 0, 100, 75); assertEquals(ERROR_MESSAGE, 25, health.getScore()); }
8485868788899091
/** * Tests whether we don't get a healthy report if the reporting is disabled. */ @Test public void testNoHealthyReport() { HealthReport health = createHealthReport(false, 0, 100, 75); assertNull(ERROR_MESSAGE, health); }