BAEL-2670: change assertTrue(a==b) to assertEquals(a,b,delta)

This commit is contained in:
sharifi 2021-08-12 11:17:50 +04:30
parent 9c27a90786
commit b30c3976be
1 changed files with 9 additions and 9 deletions

View File

@ -119,9 +119,9 @@ public class MicrometerAtlasIntegrationTest {
.counter()); .counter());
assertTrue(counterOptional.isPresent()); assertTrue(counterOptional.isPresent());
assertTrue(counterOptional assertEquals(counterOptional
.get() .get()
.count() == 2.0); .count() , 2.0, 0.0);
} }
@Test @Test
@ -134,10 +134,10 @@ public class MicrometerAtlasIntegrationTest {
.register(registry); .register(registry);
counter.increment(2.0); counter.increment(2.0);
assertTrue(counter.count() == 2); assertEquals(counter.count(), 2, 0);
counter.increment(-1); counter.increment(-1);
assertTrue(counter.count() == 1); assertEquals(counter.count(), 1, 0);
} }
@Test @Test
@ -153,7 +153,7 @@ public class MicrometerAtlasIntegrationTest {
timer.record(30, TimeUnit.MILLISECONDS); timer.record(30, TimeUnit.MILLISECONDS);
assertTrue(2 == timer.count()); assertEquals(2, timer.count(), 0);
assertThat(timer.totalTime(TimeUnit.MILLISECONDS)).isBetween(40.0, 55.0); assertThat(timer.totalTime(TimeUnit.MILLISECONDS)).isBetween(40.0, 55.0);
} }
@ -183,10 +183,10 @@ public class MicrometerAtlasIntegrationTest {
.builder("cache.size", list, List::size) .builder("cache.size", list, List::size)
.register(registry); .register(registry);
assertTrue(gauge.value() == 0.0); assertEquals(gauge.value(), 0.0, 0.0);
list.add("1"); list.add("1");
assertTrue(gauge.value() == 1.0); assertEquals(gauge.value(), 1.0, 0.0);
} }
@Test @Test
@ -200,8 +200,8 @@ public class MicrometerAtlasIntegrationTest {
distributionSummary.record(4); distributionSummary.record(4);
distributionSummary.record(5); distributionSummary.record(5);
assertTrue(3 == distributionSummary.count()); assertEquals(3, distributionSummary.count(), 0);
assertTrue(12 == distributionSummary.totalAmount()); assertEquals(12, distributionSummary.totalAmount(), 0);
} }
@Test @Test