1 | public void testOrder1() throws IOException, ManifestException {↵ | | 1 | public void testOrder2() throws IOException, ManifestException {↵
|
2 | executeTarget("testOrder1");↵ | | 2 | executeTarget("testOrder2");↵
|
|
3 | Manifest manifest = getManifest(EXPANDED_MANIFEST);↵ | | 3 | Manifest manifest = getManifest(EXPANDED_MANIFEST);↵
|
4 | Enumeration e = manifest.getSectionNames();↵ | | 4 | Enumeration e = manifest.getSectionNames();↵
|
5 | String section1 = (String)e.nextElement();↵ | | 5 | String section1 = (String)e.nextElement();↵
|
6 | String section2 = (String)e.nextElement();↵ | | 6 | String section2 = (String)e.nextElement();↵
|
7 | assertEquals("First section name unexpected", "Test1", section1);↵ | | 7 | assertEquals("First section name unexpected", "Test2", section1);↵
|
8 | assertEquals("Second section name unexpected", "Test2", section2);↵ | | 8 | assertEquals("Second section name unexpected", "Test1", section2);↵
|
|
9 | Manifest.Section section = manifest.getSection("Test1");↵ | | 9 | Manifest.Section section = manifest.getSection("Test1");↵
|
10 | e = section.getAttributeKeys();↵ | | 10 | e = section.getAttributeKeys();↵
|
11 | String attr1Key = (String)e.nextElement();↵ | | 11 | String attr1Key = (String)e.nextElement();↵
|
12 | String attr2Key = (String)e.nextElement();↵ | | 12 | String attr2Key = (String)e.nextElement();↵
|
13 | String attr1 = section.getAttribute(attr1Key).getName();↵ | | 13 | String attr1 = section.getAttribute(attr1Key).getName();↵
|
14 | String attr2 = section.getAttribute(attr2Key).getName();↵ | | 14 | String attr2 = section.getAttribute(attr2Key).getName();↵
|
15 | assertEquals("First attribute name unexpected", "TestAttr1", attr1);↵ | | 15 | assertEquals("First attribute name unexpected", "TestAttr2", attr1);↵
|
16 | assertEquals("Second attribute name unexpected", "TestAttr2", attr2);↵ | | 16 | assertEquals("Second attribute name unexpected", "TestAttr1", attr2);↵
|
17 | | | 17 |
|