Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import static java.util.Collections.singleton;
import static java.util.Collections.singletonMap;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;

import jakarta.json.Json;
import jakarta.json.JsonConfig;
Expand Down Expand Up @@ -169,6 +170,7 @@ public void testNullCheckValueExceptionMessage() {
final JsonObjectBuilder builder = Json.createObjectBuilder();
try {
builder.add("name", (JsonValue) null);
fail("Expected NullPointerException for a null value");
} catch (final NullPointerException e) {
assertEquals("value/builder must not be null for name: name", e.getMessage());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,7 @@ public int read() throws IOException {
JsonParser parser = null;
try {
parser = Json.createParser(bin);
fail();
} catch (JsonException e) {
assertEquals("We were expecting another cause", "Expected", e.getCause().getMessage());
} finally {
Expand Down
Loading