Class MarshallingTestBase
java.lang.Object
info.ejava.examples.svc.content.quotes.dto.MarshallingTestBase
- Direct Known Subclasses:
JacksonJsonTest
,JacksonXmlTest
,JaxbTest
,JsonbTest
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal String
final String
protected static final net.datafaker.Faker
static final String
static final String
static final String
protected static ZonedDateTime
protected QuoteDTOFactory
static final String
static final TimeZone
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canParseFormat
(String format, ZoneOffset tzo) protected abstract String
protected abstract String
get_marshalled_adate
(String dateText) void
init()
protected abstract <T> String
marshal
(T object) private <T> T
marshal_and_demarshal
(T obj, Class<T> type) void
marshal_dates
(ZonedDateTime zdt, String name, Object format) void
void
parse_date
(String dateText, String name, Date date) void
void
static ZonedDateTime
static Stream<org.junit.jupiter.params.provider.Arguments>
static Stream<org.junit.jupiter.params.provider.Arguments>
protected abstract <T> T
-
Field Details
-
faker
protected static final net.datafaker.Faker faker -
UTC_TZ
-
ISO_8601_DATETIME_FORMAT
- See Also:
-
RFC_822_DATETIME_FORMAT
- See Also:
-
ISO_8601_DATETIME4_FORMAT
- See Also:
-
ISO_8601_DATETIME5_FORMAT
- See Also:
-
DATES_XML
- See Also:
-
DATES_JSON
- See Also:
-
jul4Utc
-
quoteDTOFactory
-
-
Constructor Details
-
MarshallingTestBase
public MarshallingTestBase()
-
-
Method Details
-
randomZdt
-
init
public void init() -
marshal
- Throws:
Exception
-
unmarshal
- Throws:
Exception
-
get_marshalled_adate
-
get_date
-
marshal_and_demarshal
- Throws:
Exception
-
quote_dto_marshals
- Throws:
Exception
-
quotesList_dto_marshals
- Throws:
Exception
-
message_dto_marshals
- Throws:
Exception
-
parse_date
@ParameterizedTest @MethodSource("read_from_formats") public void parse_date(String dateText, String name, Date date) throws Exception - Throws:
Exception
-
read_from_formats
-
canParseFormat
-
read_by_formats
-
marshal_dates
@ParameterizedTest @MethodSource("read_by_formats") public void marshal_dates(ZonedDateTime zdt, String name, Object format) throws Exception - Throws:
Exception
-