KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thoughtworks > xstream > converters > extended > EncodedByteArrayConverterTest


1 package com.thoughtworks.xstream.converters.extended;
2
3 import com.thoughtworks.acceptance.AbstractAcceptanceTest;
4
5 public class EncodedByteArrayConverterTest extends AbstractAcceptanceTest {
6
7     public void testMarshallsCharArrayAsSingleString() {
8
9         byte[] input = new byte[] {0, 120, -124, 22, 33, 0, 5};
10         String JavaDoc expected = "<byte-array>AHiEFiEABQ==</byte-array>";
11
12         xstream.registerConverter(new EncodedByteArrayConverter());
13
14         assertBothWays(input, expected);
15     }
16 }
17
Popular Tags