Skip to content

Commit

Permalink
Use Assertions.assertInstanceOf()
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Sep 1, 2024
1 parent 3f8d21f commit 549e884
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import static org.hamcrest.Matchers.lessThanOrEqualTo;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
Expand Down Expand Up @@ -1160,7 +1161,7 @@ public void testBrokenFactoryShouldNotBlockPool() throws Exception {
}
// Failure expected
assertNotNull(ex);
assertTrue(ex instanceof NoSuchElementException);
assertInstanceOf(NoSuchElementException.class, ex);
assertNull(obj);

// Configure factory to create valid objects so subsequent borrows work
Expand Down

0 comments on commit 549e884

Please sign in to comment.