Class MarshallingTestBase

java.lang.Object
info.ejava.examples.svc.content.quotes.dto.MarshallingTestBase
Direct Known Subclasses:
JacksonJsonTest, JacksonXmlTest, JaxbTest, JsonbTest

public abstract class MarshallingTestBase extends Object
  • Field Details

  • Constructor Details

    • MarshallingTestBase

      public MarshallingTestBase()
  • Method Details

    • randomZdt

      public static ZonedDateTime randomZdt()
    • init

      public void init()
    • marshal

      protected abstract <T> String marshal(T object) throws Exception
      Throws:
      Exception
    • unmarshal

      protected abstract <T> T unmarshal(Class<T> type, String buffer) throws Exception
      Throws:
      Exception
    • get_marshalled_adate

      protected abstract String get_marshalled_adate(String dateText)
    • get_date

      protected abstract String get_date(String marshalledDates)
    • marshal_and_demarshal

      private <T> T marshal_and_demarshal(T obj, Class<T> type) throws Exception
      Throws:
      Exception
    • quote_dto_marshals

      @Test public void quote_dto_marshals() throws Exception
      Throws:
      Exception
    • quotesList_dto_marshals

      @Test public void quotesList_dto_marshals() throws Exception
      Throws:
      Exception
    • message_dto_marshals

      @Test public void message_dto_marshals() throws Exception
      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

      public static Stream<org.junit.jupiter.params.provider.Arguments> read_from_formats()
    • canParseFormat

      protected boolean canParseFormat(String format, ZoneOffset tzo)
    • read_by_formats

      public static Stream<org.junit.jupiter.params.provider.Arguments> read_by_formats()
    • marshal_dates

      @ParameterizedTest @MethodSource("read_by_formats") public void marshal_dates(ZonedDateTime zdt, String name, Object format) throws Exception
      Throws:
      Exception