01: /*
02: * Copyright (C) 2004 Joe Walnes.
03: * Copyright (C) 2006, 2007 XStream Committers.
04: * All rights reserved.
05: *
06: * The software in this package is published under the terms of the BSD
07: * style license a copy of which has been included with this distribution in
08: * the LICENSE.txt file.
09: *
10: * Created on 07. March 2004 by Joe Walnes
11: */
12: package com.thoughtworks.xstream.converters.collections;
13:
14: import com.thoughtworks.acceptance.AbstractAcceptanceTest;
15:
16: import java.util.BitSet;
17:
18: public class BitSetConverterTest extends AbstractAcceptanceTest {
19:
20: public void testConvertsToSingleCommaDelimitedString() {
21: BitSet bitSet = new BitSet();
22: bitSet.set(0);
23: bitSet.set(1);
24: bitSet.set(3);
25: bitSet.set(5);
26: bitSet.set(6);
27: bitSet.set(8);
28: bitSet.set(10);
29:
30: String expected = "<bit-set>0,1,3,5,6,8,10</bit-set>";
31:
32: assertBothWays(bitSet, expected);
33: }
34: }
|