Skip to content

Commit 39df511

Browse files
vbabaninstIncMale
andauthored
Update src/integrationTest/java/com/mongodb/hibernate/jdbc/MongoPreparedStatementIntegrationTests.java
Co-authored-by: Valentin Kovalenko <[email protected]>
1 parent 76acbc5 commit 39df511

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/integrationTest/java/com/mongodb/hibernate/jdbc/MongoPreparedStatementIntegrationTests.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -723,10 +723,9 @@ void testNotSupportedDeleteElements(String unsupportedElement) {
723723
]
724724
}""",
725725
unsupportedElement))) {
726-
SQLFeatureNotSupportedException exception =
727-
assertThrows(SQLFeatureNotSupportedException.class, pstm::executeUpdate);
728-
assertThat(exception.getMessage())
729-
.isEqualTo(format("Unsupported elements in delete command: [%s]", unsupportedElement));
726+
assertThatThrownBy(pstm::executeUpdate)
727+
.isInstanceOf(SQLFeatureNotSupportedException.class)
728+
.hasMessage("Unsupported elements in delete command: [%s]".formatted(unsupportedElement));
730729
}
731730
});
732731
}

0 commit comments

Comments
 (0)