Skip to content

Commit b244382

Browse files
committed
tests: Use assert does not throw instead of empty try
1 parent a2b84a6 commit b244382

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/test/java/org/apache/ibatis/io/ExternalResourcesTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package org.apache.ibatis.io;
1717

18+
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
1819
import static org.junit.jupiter.api.Assertions.assertEquals;
1920
import static org.junit.jupiter.api.Assertions.assertTrue;
2021
import static org.junit.jupiter.api.Assertions.fail;
@@ -49,11 +50,9 @@ void setUp() throws Exception {
4950

5051
@Test
5152
void testcopyExternalResource() {
52-
53-
try {
53+
assertDoesNotThrow(() -> {
5454
ExternalResources.copyExternalResource(sourceFile, destFile);
55-
} catch (IOException e) {
56-
}
55+
});
5756

5857
}
5958

0 commit comments

Comments
 (0)