Avoid dep on NB sources.
authorJesse Glick <jglick@netbeans.org>
Thu, 21 Jul 2011 11:12:44 -0400
changeset 175280f242d7d2acc
parent 17527 b877c5fbce8d
child 17529 a520bdc7a804
Avoid dep on NB sources.
other/signatures/test/org/netbeans/signatures/SignatureTaskTest.java
     1.1 --- a/other/signatures/test/org/netbeans/signatures/SignatureTaskTest.java	Thu Jul 21 11:09:57 2011 -0400
     1.2 +++ b/other/signatures/test/org/netbeans/signatures/SignatureTaskTest.java	Thu Jul 21 11:12:44 2011 -0400
     1.3 @@ -48,7 +48,6 @@
     1.4  import junit.framework.TestCase;
     1.5  import org.apache.tools.ant.BuildEvent;
     1.6  import org.apache.tools.ant.BuildListener;
     1.7 -import org.apache.tools.ant.BuildLogger;
     1.8  import org.apache.tools.ant.Project;
     1.9  import org.apache.tools.ant.types.FileSet;
    1.10  
    1.11 @@ -63,8 +62,6 @@
    1.12      
    1.13      private File antJar;
    1.14      private File antLauncherJar;
    1.15 -    private File antModuleJar;
    1.16 -    private File nbdev;
    1.17      
    1.18      protected void setUp() throws Exception {
    1.19          super.setUp();
    1.20 @@ -72,10 +69,6 @@
    1.21          assertTrue(antJar.getAbsolutePath(), antJar.isFile());
    1.22          antLauncherJar = new File(antJar.getParentFile(), "ant-launcher.jar");
    1.23          assertTrue(antLauncherJar.getAbsolutePath(), antLauncherJar.isFile());
    1.24 -        nbdev = new File(antJar.getParentFile().getParentFile().getParentFile().getParentFile(), "nbbuild/netbeans");
    1.25 -        assertTrue(nbdev.isDirectory());
    1.26 -        antModuleJar = new File(nbdev, "ide8/modules/org-apache-tools-ant-module.jar");
    1.27 -        assertTrue(antModuleJar.getAbsolutePath(), antModuleJar.isFile());
    1.28      }
    1.29      
    1.30      public void testExecuteAnt() throws Exception {
    1.31 @@ -112,35 +105,6 @@
    1.32          }
    1.33      }
    1.34      
    1.35 -    public void testExecuteNB() throws Exception {
    1.36 -        Project p = new Project();
    1.37 -        p.addBuildListener(new Listener());
    1.38 -        SignatureTask task = new SignatureTask();
    1.39 -        task.setProject(p);
    1.40 -        File out = File.createTempFile("signatures", ".java");
    1.41 -        task.setOut(out);
    1.42 -        FileSet fs = new FileSet();
    1.43 -        fs.setProject(p);
    1.44 -        fs.setDir(nbdev);
    1.45 -        fs.setIncludes("*/modules/*.jar,*/lib/*.jar,*/core/*.jar");
    1.46 -        task.addFileSet(fs);
    1.47 -        task.execute();
    1.48 -        assertTrue(out.isFile());
    1.49 -        Reader r = new FileReader(out);
    1.50 -        try {
    1.51 -            BufferedReader b = new BufferedReader(r);
    1.52 -            while (true) {
    1.53 -                String l = b.readLine();
    1.54 -                assertNotNull("found matching line in " + out, l);
    1.55 -                if (l.equals("{Class _ = javax.help.HelpSet.class;}")) {
    1.56 -                    break;
    1.57 -                }
    1.58 -            }
    1.59 -        } finally {
    1.60 -            r.close();
    1.61 -        }
    1.62 -    }
    1.63 -    
    1.64      private static final class Listener implements BuildListener {
    1.65          
    1.66          Listener() {}