Skip to content

Commit

Permalink
use assertThat
Browse files Browse the repository at this point in the history
  • Loading branch information
rayz committed Oct 31, 2023
1 parent ca703ee commit e08836f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/test/java/org/datadog/jmxfetch/TestCommon.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.datadog.jmxfetch;

import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
Expand Down Expand Up @@ -270,7 +272,7 @@ public void assertMetric(
assertEquals(countTags, mTags.size());
}
for (String t : tags) {
assertTrue(t + " missing from metric tags", mTags.contains(t));
assertThat(mTags, hasItem(t));
}

if (metricType != null) {
Expand Down

0 comments on commit e08836f

Please sign in to comment.