cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Leicester <mark.leices...@energyintellect.com>
Subject AbstractSerializerTestCase
Date Sat, 09 Aug 2003 13:08:14 GMT
Hi Stephan,

I notice that there is no serializer test case, so I have written one using
a byte[] to store the output of the serializer for subsequent comparison
with another source.

Do you have plans for serializer test cases, and if so does this code fit
the bill? I thought I should post it to you and the list for comment before
I submit it as a patch.

I have not integrated it into the CompositeTestCase class.

It is called in the usual way, e.g.:

  public void testMIDISerializer() throws Exception
  {
    String type = "midi";
    String input = "resource://org/apache/cocoon/generation/Prelude.xmi";
    Parameters parameters = new Parameters();
    String control = "resource://org/apache/cocoon/generation/Prelude.mid";

    assertIdentical(loadByteArray(control),
      serialize(type, parameters, load(input)));
  }

Mark


Mime
View raw message