Proper use of JUnit APIs

This commit is contained in:
Gary Gregory 2023-09-30 10:39:58 -04:00
parent 5d2557714c
commit 8c4ecf734e
1 changed files with 1 additions and 6 deletions

View File

@ -255,12 +255,7 @@ public class CSVRecordTest {
assertFalse(rec.isSet("A"));
assertEquals(0, rec.toMap().size());
// This will throw
try {
rec.get("A");
org.junit.jupiter.api.Assertions.fail("Access by name is not expected after deserialisation");
} catch (final IllegalStateException expected) {
// OK
}
assertThrows(IllegalStateException.class, () -> rec.get("A"));
}
}