Package org.junit.jupiter.api.extension
Class MediaType
java.lang.Object
org.junit.jupiter.api.MediaType
org.junit.jupiter.api.extension.MediaType
Deprecated.
Represents a media type as defined by
RFC 2045.
- Since:
- 5.12
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final MediaTypeDeprecated.Theapplication/jsonmedia type.static final MediaTypeDeprecated.UseAPPLICATION_JSONinstead.static final MediaTypeDeprecated.Theapplication/octet-streammedia type.static final MediaTypeDeprecated.Theimage/jpegmedia type.static final MediaTypeDeprecated.Theimage/pngmedia type.static final MediaTypeDeprecated.Thetext/plainmedia type.static final MediaTypeDeprecated.Thetext/plain; charset=UTF-8media type. -
Method Summary
-
Field Details
-
TEXT_PLAIN
Deprecated.Thetext/plainmedia type. -
TEXT_PLAIN_UTF_8
Deprecated.Thetext/plain; charset=UTF-8media type. -
APPLICATION_JSON
Deprecated.Theapplication/jsonmedia type. -
APPLICATION_JSON_UTF_8
@Deprecated @API(status=DEPRECATED, since="5.14") public static final MediaType APPLICATION_JSON_UTF_8Deprecated.UseAPPLICATION_JSONinstead.Theapplication/json; charset=UTF-8media type. -
APPLICATION_OCTET_STREAM
Deprecated.Theapplication/octet-streammedia type. -
IMAGE_JPEG
Deprecated.Theimage/jpegmedia type. -
IMAGE_PNG
Deprecated.Theimage/pngmedia type.
-
-
Method Details
-
parse
Deprecated.Parse the given media type value.Must be valid according to RFC 2045.
- Parameters:
value- the media type value to parse; nevernullor blank- Returns:
- the parsed media type
- Throws:
org.junit.platform.commons.PreconditionViolationException- if the value is not a valid media type
-
create
Deprecated.Create a media type with the given type and subtype.- Parameters:
type- the type; nevernullor blanksubtype- the subtype; nevernullor blank- Returns:
- the media type
-
create
Deprecated.Create a media type with the given type, subtype, and charset.- Parameters:
type- the type; nevernullor blanksubtype- the subtype; nevernullor blankcharset- the charset; nevernull- Returns:
- the media type
-
MediaTypeinstead.