Convert to assertThrows

Relates to #652
This commit is contained in:
Felix Schumacher 2021-04-10 11:32:49 +02:00
parent 22b21ad479
commit c8ab6a684c
1 changed files with 2 additions and 6 deletions

View File

@ -18,7 +18,7 @@
package org.apache.jmeter.save;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.junit.jupiter.api.Assertions.assertThrows;
import java.io.BufferedReader;
import java.io.IOException;
@ -94,11 +94,7 @@ public class TestCSVSaveService extends JMeterTestCase {
@Test
public void testSplitBadQuote() throws Exception {
try {
checkSplitString("a\"b",',',new String[]{});
fail("Should have generated IOException");
} catch (IOException e) {
}
assertThrows(IOException.class, () -> checkSplitString("a\"b", ',', new String[] {}));
}
@Test