-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
869023f
commit 310734f
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/misc/DateTimeExceptionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.fasterxml.jackson.datatype.jsr310.misc; | ||
|
||
import java.time.DateTimeException; | ||
|
||
import org.junit.Test; | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import com.fasterxml.jackson.datatype.jsr310.ModuleTestBase; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class DateTimeExceptionTest extends ModuleTestBase | ||
{ | ||
private final ObjectMapper MAPPER = newMapper(); | ||
|
||
// [modules-java#319]: should not fail to ser/deser DateTimeException | ||
@Test | ||
public void testDateTimeExceptionRoundtrip() throws Exception | ||
{ | ||
String json = MAPPER.writeValueAsString(new DateTimeException("Test!")); | ||
DateTimeException result = MAPPER.readValue(json, DateTimeException.class); | ||
assertEquals("Test!", result.getMessage()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters