Package net.sf.urlchecker.commands

Examples of net.sf.urlchecker.commands.Result


        public Set<Result> process(Context input) throws ConfigurationException {
            final Iterator<Result> iter = input.getResults().iterator();
            final Context tempCtx = new StandardContext(input);

            while (iter.hasNext()) {
                final Result res = iter.next();
                if (!AVOID.equals(res.getTarget())) {
                    tempCtx.getResults().add(res);
                }
            }
            return super.process(tempCtx);
        }
View Full Code Here


            tasks.add(future);
        }

        try {
            for (final Future<CheckUrlsProcess> f : tasks) {
                final Result result = f.get().getResult();

                if (LOGGER.isDebugEnabled()) {
                    LOGGER.debug(result.getResult() + " for " + result.getURI()
                            + " with " + result.getUserData());
                }
            }

            service.shutdown();
        } catch (final InterruptedException e) {
View Full Code Here

            assertEquals(14, context.getResults().size());
            assertNull(CollectionUtils.find(context.getResults(),
                    new Predicate() {

                        public boolean evaluate(final Object object) {
                            final Result r = (Result) object;
                            return r.isValid();
                        }
                    }));

        } catch (final HttpException e) {
            fail("exception should not occur");
View Full Code Here

            command.process(context);
            assertEquals(14, context.getResults().size());
            assertNull(CollectionUtils.find(context.getResults(),
                    new Predicate() {
                        public boolean evaluate(final Object object) {
                            final Result r = (Result) object;
                            return r.isValid();
                        }
                    }));

        } catch (final HttpException e) {
            fail("exception should not occur");
View Full Code Here

     * Test method for
     * {@link net.sf.urlchecker.commands.Result#equals(java.lang.Object)}.
     */
    @Test
    public void testEqualsObject() {
        final Result r1 = new Result();
        assertFalse(r1.equals(null));
        assertTrue(r1.equals(r1));
        assertFalse(r1.equals(null));
        final Result r2 = new Result();
        assertTrue(r1.equals(r2));
    }
View Full Code Here

    /**
     * Test method for {@link net.sf.urlchecker.commands.Result#getUserData()}.
     */
    @Test
    public void testGetUserData() {
        final Result r1 = new Result();
        r1.setUserData("Something");
        assertTrue(r1.getUserData().equals("Something"));
    }
View Full Code Here

TOP

Related Classes of net.sf.urlchecker.commands.Result

Copyright © 2018 www.massapicom. 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.