Top Description Fields Constructors Methods
org.junit.platform.engine.reporting

public final Class ReportEntry

extends Object
Class Inheritance
Annotations
@API
status:STABLE
since:1.0
Static Imports
org.apiguardian.api.API.Status.DEPRECATED, .API.Status.STABLE

ReportEntry encapsulates a time-stamped map of String-based key-value pairs to be published to the reporting infrastructure.
Since
1.0
See Also
from(Map), from(String, String)

Field Summary

Modifier and TypeField and Description
private final Map<String, String>
private final LocalDateTime

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
add(String key, String value)

public static ReportEntry
from(Map<String, String>
the map of key-value pairs to be published; never null; keys and values within entries in the map also must not be null or blank
keyValuePairs
)

Factory for creating a new ReportEntry from a map of key-value pairs.

public static ReportEntry
from(String
the key under which the value should published; never null or blank
key
,
String
the value to publish; never null or blank
value
)

Factory for creating a new ReportEntry from a key-value pair.

public final Map<String, String>

Returns:

a copy of the map of key-value pairs; never null
getKeyValuePairs
()

Get an unmodifiable copy of the map of key-value pairs to be published.

public final LocalDateTime

Returns:

when this entry was created; never null
getTimestamp
()

Get the timestamp for when this ReportEntry was created.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

keyValuePairsback to summary
private final Map<String, String> keyValuePairs
timestampback to summary
private final LocalDateTime timestamp

Constructor Detail

ReportEntryback to summary
public ReportEntry()

Deprecated

Use from(String, String) or from(Map)

Annotations
@API
status:DEPRECATED
since:5.8
@Deprecated

Method Detail

addback to summary
private void add(String key, String value)
fromback to summary
public static ReportEntry from(Map<String, String> keyValuePairs)

Factory for creating a new ReportEntry from a map of key-value pairs.

Parameters
keyValuePairs:Map<String, String>

the map of key-value pairs to be published; never null; keys and values within entries in the map also must not be null or blank

fromback to summary
public static ReportEntry from(String key, String value)

Factory for creating a new ReportEntry from a key-value pair.

Parameters
key:String

the key under which the value should published; never null or blank

value:String

the value to publish; never null or blank

getKeyValuePairsback to summary
public final Map<String, String> getKeyValuePairs()

Get an unmodifiable copy of the map of key-value pairs to be published.

Returns:Map<String, String>

a copy of the map of key-value pairs; never null

getTimestampback to summary
public final LocalDateTime getTimestamp()

Get the timestamp for when this ReportEntry was created.

Can be used, for example, to order entries.

Returns:LocalDateTime

when this entry was created; never null

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override