public ListAndUnionTests(String name) { super(name); }
public static Test suite() { return new TestSuite(ListAndUnionTests.class); }
public void testListGetters() throws Exception
{
ListsDocument lists = ListsDocument.Factory.parse(
"<lut:lists xmlns:lut='http://openuri.org/lut'><lut:int-list>2 4 8 16 32</lut:int-list><lut:nni-list>unbounded 3 unbounded 6</lut:nni-list></lut:lists>");
List intList = lists.getLists().getIntList();
Assert.assertEquals(new Integer(2), intList.get(0));
Assert.assertEquals(new Integer(4), intList.get(1));
Assert.assertEquals(new Integer(8), intList.get(2));
Assert.assertEquals(new Integer(16), intList.get(3));
Assert.assertEquals(new Integer(32), intList.get(4));
Assert.assertEquals(5, intList.size());
List nniList = lists.getLists().getNniList();
Assert.assertEquals("unbounded", nniList.get(0));
Assert.assertEquals(BigInteger.valueOf(3), nniList.get(1));
Assert.assertEquals("unbounded", nniList.get(2));
Assert.assertEquals(BigInteger.valueOf(6), nniList.get(3));
Assert.assertEquals(4, nniList.size());