Package com.zfabrik.z2unit.impl
Class Protocol
java.lang.Object
com.zfabrik.z2unit.impl.Protocol
Protocol abstraction for z2 unit. Essentially a wrapper around Java (de-) serialization tasks.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.junit.runner.Description
deSerializeDescription(Reader reader)
Read a JUnit description from a reader - used on serverstatic Protocol.SEvent
deSerializeEvent(Reader reader)
Read a JUnit event from a reader - used in runnerstatic byte[]
fromBase64Chunk(Reader reader)
static void
Write a JUnit event to a writer.static void
Write a JUnit event to a writer.static void
Write a JUnit event to a writer.static void
Write a JUnit description to a writer.static void
Write a JUnit result to a writer.static String
toBase64Chunk(byte[] bytes)
-
Field Details
-
EVENT_TEST_ASSUMPTION_FAILURE
- See Also:
- Constant Field Values
-
EVENT_TEST_FAILURE
- See Also:
- Constant Field Values
-
EVENT_TEST_FINISHED
- See Also:
- Constant Field Values
-
EVENT_TEST_IGNORED
- See Also:
- Constant Field Values
-
EVENT_TEST_RUN_FINISHED
- See Also:
- Constant Field Values
-
EVENT_TEST_RUN_STARTED
- See Also:
- Constant Field Values
-
EVENT_TEST_STARTED
- See Also:
- Constant Field Values
-
-
Constructor Details
-
Protocol
public Protocol()
-
-
Method Details
-
serialize
public static void serialize(org.junit.runner.Description description, Writer writer) throws IOExceptionWrite a JUnit description to a writer. This is sent from the runner- Throws:
IOException
-
serialize
Write a JUnit result to a writer. This is sent back from the server.- Throws:
IOException
-
serialize
public static void serialize(String type, org.junit.runner.Description description, Writer writer) throws IOExceptionWrite a JUnit event to a writer. This is sent back from the server.- Throws:
IOException
-
serialize
public static void serialize(String type, org.junit.runner.notification.Failure failure, Writer writer) throws IOExceptionWrite a JUnit event to a writer. This is sent back from the server.- Throws:
IOException
-
serialize
public static void serialize(String type, org.junit.runner.Result result, Writer writer) throws IOExceptionWrite a JUnit event to a writer. This is sent back from the server.- Throws:
IOException
-
deSerializeDescription
public static org.junit.runner.Description deSerializeDescription(Reader reader) throws IOExceptionRead a JUnit description from a reader - used on server- Throws:
IOException
-
deSerializeEvent
Read a JUnit event from a reader - used in runner- Throws:
IOException
-
toBase64Chunk
- Throws:
IOException
-
fromBase64Chunk
- Throws:
IOException
-