Class Protocol

java.lang.Object
com.zfabrik.z2unit.impl.Protocol

public class Protocol extends Object
Protocol abstraction for z2 unit. Essentially a wrapper around Java (de-) serialization tasks.
  • Field Details

  • Constructor Details

    • Protocol

      public Protocol()
  • Method Details

    • serialize

      public static void serialize(org.junit.runner.Description description, Writer writer) throws IOException
      Write a JUnit description to a writer. This is sent from the runner
      Throws:
      IOException
    • serialize

      public static void serialize(org.junit.runner.Result result, Writer writer) throws IOException
      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 IOException
      Write 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 IOException
      Write 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 IOException
      Write 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 IOException
      Read a JUnit description from a reader - used on server
      Throws:
      IOException
    • deSerializeEvent

      public static Protocol.SEvent deSerializeEvent(Reader reader) throws IOException
      Read a JUnit event from a reader - used in runner
      Throws:
      IOException
    • toBase64Chunk

      public static String toBase64Chunk(byte[] bytes) throws IOException
      Throws:
      IOException
    • fromBase64Chunk

      public static byte[] fromBase64Chunk(Reader reader) throws IOException
      Throws:
      IOException