Class JsonConverter

java.lang.Object
net.joshka.junit.json.params.JsonConverter
All Implemented Interfaces:
org.junit.jupiter.params.converter.ArgumentConverter

public class JsonConverter extends Object implements org.junit.jupiter.params.converter.ArgumentConverter
  • Constructor Details

    • JsonConverter

      public JsonConverter()
  • Method Details

    • convert

      public Object convert(Object source, org.junit.jupiter.api.extension.ParameterContext context)
      Convert the supplied source object according to the supplied context.
      Specified by:
      convert in interface org.junit.jupiter.params.converter.ArgumentConverter
      Parameters:
      source - the source object to convert; may be null
      context - the parameter context where the converted object will be used; never null
      Returns:
      the converted object; may be null but only if the target type is a reference type
      Throws:
      org.junit.jupiter.params.converter.ArgumentConversionException - if an error occurs during the conversion