Package com.pogofish.jadt.sink

Examples of com.pogofish.jadt.sink.StringSinkFactoryFactory.results()


       
        antTask.setSrcPath(JADT.TEST_SRC_INFO);
        antTask.setDestDir(JADT.TEST_DIR);
        antTask.execute();
       
        final String result = factory.results().get(JADT.TEST_DIR).get(0).getResults().get(JADT.TEST_CLASS_NAME);
        assertEquals(JADT.TEST_SRC_INFO, result);
    }
   
    /**
     * Make sure exceptions are handled properly
View Full Code Here


        antTask.setSrcPath(JADT.TEST_SRC_INFO);
        antTask.setDestDir(JADT.TEST_DIR);
        try {
            antTask.execute();
           
            final String result = factory.results().get(JADT.TEST_DIR).get(0).getResults().get(JADT.TEST_CLASS_NAME);
            fail("Did not get exception, got " + result);
        } catch (BuildException e) {
            // yay
        }
    }
View Full Code Here

     * resulting string (or throw the resulting exception
     */
    private String testWithDummyJADT(String[] args, List<SyntaxError> syntaxErrors, List<SemanticError> semanticErrors) {
        final StringSinkFactoryFactory factory = new StringSinkFactoryFactory();
        JADT.createDummyJADT(syntaxErrors, semanticErrors, JADT.TEST_SRC_INFO, factory).parseAndEmit(args);
        return factory.results().get(JADT.TEST_DIR).get(0).getResults().get(JADT.TEST_CLASS_NAME);
    }

   
    /**
     * Ensure that sending bad args to parseAndEmit gets an IllegalArgumentException
View Full Code Here

        mojo.setSrcPath(srcFile);
        mojo.setDestDir(destDir);
        mojo.setProject(new MavenProject());
        mojo.execute();
       
        final String result = factory.results().get(destDir.getCanonicalPath()).get(0).getResults().get(JADT.TEST_CLASS_NAME);
        assertEquals(JADT.TEST_SRC_INFO, result);
        assertEquals(1, mojo.project.getCompileSourceRoots().size());
        assertEquals(destDir.getCanonicalPath(), mojo.project.getCompileSourceRoots().get(0));
    }
   
View Full Code Here

        mojo.setProject(new MavenProject());
       
        try {
            mojo.execute();

            final String result = factory.results().get(destDir.getCanonicalPath()).get(0).getResults().get(JADT.TEST_CLASS_NAME);
            fail("Did not get exception, got " + result);
        } catch (MojoExecutionException e) {
            // yay
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.