Examples of results()


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

        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

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

     * 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

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

        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

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

        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

Examples of com.stumbleupon.async.DeferredGroupException.results()

    final class ShutdownErrback implements Callback<Object, Exception> {
      public Object call(final Exception e) {
        final Logger LOG = LoggerFactory.getLogger(ShutdownErrback.class);
        if (e instanceof DeferredGroupException) {
          final DeferredGroupException ge = (DeferredGroupException) e;
          for (final Object r : ge.results()) {
            if (r instanceof Exception) {
              LOG.error("Failed to shutdown the TSD", (Exception) r);
            }
          }
        } else {
View Full Code Here

Examples of com.stumbleupon.async.DeferredGroupException.results()

    final class ShutdownErrback implements Callback<Object, Exception> {
      public Object call(final Exception e) {
        final Logger LOG = LoggerFactory.getLogger(ShutdownErrback.class);
        if (e instanceof DeferredGroupException) {
          final DeferredGroupException ge = (DeferredGroupException) e;
          for (final Object r : ge.results()) {
            if (r instanceof Exception) {
              LOG.error("Failed to shutdown the TSD", (Exception) r);
            }
          }
        } else {
View Full Code Here

Examples of de.innovationgate.webgate.api.WGResultSet.results()

           
            // First get to start position
            int startCtr  = start;
            while (sets.hasNext()) {
                currentSet = (WGResultSet) sets.next();
                if (currentSet.results() < startCtr) {
                    startCtr -= currentSet.results();
                    currentSet = null;
                }
                else {
                    break;
View Full Code Here

Examples of de.innovationgate.webgate.api.WGResultSet.results()

            // First get to start position
            int startCtr  = start;
            while (sets.hasNext()) {
                currentSet = (WGResultSet) sets.next();
                if (currentSet.results() < startCtr) {
                    startCtr -= currentSet.results();
                    currentSet = null;
                }
                else {
                    break;
                }
View Full Code Here

Examples of de.innovationgate.webgate.api.WGResultSet.results()

            if (currentSet == null) {
                return list;
            }
           
            // The contents of this set is enough to fit the length
            if (currentSet.results() >= startCtr + (length - 1)) {
                try {
                    return currentSet.getContentList(startCtr, length);
                }
                catch (WGAPIException e) {
                    tmlContext.addwarning("Unable to retrieve content list from resultset. Exception: '" + e.getClass().getName() + "' message: '" + e.getMessage() + "'.");
View Full Code Here

Examples of de.innovationgate.webgate.api.WGResultSet.results()

            // Multiple sets are needed to fit the length
            else {
               
                // Take the first contents from this set;
                int lengthCtr = length;
                int lengthThisSet = ((int) currentSet.results()) - startCtr + 1;
                try {
                    list.addAll(currentSet.getContentList(startCtr, lengthThisSet));
                    lengthCtr -= lengthThisSet;
                }
                catch (WGAPIException e) {
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.