01: package org.netbeans.modules.projectimport.eclipse;
02:
03: import java.util.Collection;
04: import junit.framework.TestCase;
05:
06: /**
07: * @author Martin Krauskopf
08: */
09: public class UserLibraryParserTest extends TestCase {
10:
11: public UserLibraryParserTest(String testName) {
12: super (testName);
13: }
14:
15: public void testGetJars_75112() throws Exception {
16: String xmlDoc = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
17: + "<userlibrary systemlibrary=\"true\" version=\"1\">\n"
18: + "\t<archive sourceattachment=\"/space/java/0_lib\" path=\"/space/java/0_lib/cb2.jar\">\n"
19: + "\t\t<attributes>\n"
20: + "\t\t\t<attribute value=\"/space/java/0_lib\" name=\"org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY\"/>\n"
21: + "\t\t</attributes>\n"
22: + "\t</archive>\n"
23: + "\t<archive path=\"/space/java/0_lib/commons-collections-2.1.jar\"/>\n"
24: + "\t<archive path=\"/space/java/0_lib/commons-digester-1.4.1.jar\"/>\n"
25: + "</userlibrary>\n";
26: Collection jars = UserLibraryParser.getJars(xmlDoc);
27: assertEquals("three classpath entries", 3, jars.size());
28: }
29:
30: }
|