KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > projectimport > eclipse > UserLibraryParserTest


1 package org.netbeans.modules.projectimport.eclipse;
2
3 import java.util.Collection JavaDoc;
4 import junit.framework.TestCase;
5
6 /**
7  * @author Martin Krauskopf
8  */

9 public class UserLibraryParserTest extends TestCase {
10     
11     public UserLibraryParserTest(String JavaDoc testName) {
12         super(testName);
13     }
14     
15     public void testGetJars_75112() throws Exception JavaDoc {
16         String JavaDoc 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 JavaDoc jars = UserLibraryParser.getJars(xmlDoc);
27         assertEquals("three classpath entries", 3, jars.size());
28     }
29     
30 }
31
Popular Tags