Search in sources :

Example 6 with IEvent

use of com.carrotsearch.ant.tasks.junit4.events.IEvent in project randomizedtesting by randomizedtesting.

the class Deserializer method deserialize.

public IEvent deserialize() throws IOException {
    JsonToken peek = input.peek();
    if (peek == JsonToken.END_ARRAY)
        return null;
    input.beginArray();
    EventType type = EventType.valueOf(input.nextString());
    IEvent event = type.deserialize(input);
    input.endArray();
    return event;
}
Also used : JsonToken(com.carrotsearch.ant.tasks.junit4.gson.stream.JsonToken)

Aggregations

IEvent (com.carrotsearch.ant.tasks.junit4.events.IEvent)5 IStreamEvent (com.carrotsearch.ant.tasks.junit4.events.IStreamEvent)3 Deserializer (com.carrotsearch.ant.tasks.junit4.events.Deserializer)2 WriterOutputStream (com.carrotsearch.randomizedtesting.WriterOutputStream)2 AppendStdErrEvent (com.carrotsearch.ant.tasks.junit4.events.AppendStdErrEvent)1 BootstrapEvent (com.carrotsearch.ant.tasks.junit4.events.BootstrapEvent)1 FailureEvent (com.carrotsearch.ant.tasks.junit4.events.FailureEvent)1 Serializer (com.carrotsearch.ant.tasks.junit4.events.Serializer)1 TestFinishedEvent (com.carrotsearch.ant.tasks.junit4.events.TestFinishedEvent)1 AggregatedTestResultEvent (com.carrotsearch.ant.tasks.junit4.events.aggregated.AggregatedTestResultEvent)1 JsonToken (com.carrotsearch.ant.tasks.junit4.gson.stream.JsonToken)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 IOException (java.io.IOException)1 OutputStreamWriter (java.io.OutputStreamWriter)1 StringWriter (java.io.StringWriter)1 Charset (java.nio.charset.Charset)1 IdentityHashMap (java.util.IdentityHashMap)1