Package net.sf.urlchecker.commands

Examples of net.sf.urlchecker.commands.Command


    public void testProcessHttpException() {
        final InputStream inStream = this.getClass().getClassLoader()
                .getResourceAsStream("dummyData.xml");
        final Context context = new StandardContext();

        final Command com = new URLMatchCommand(null);

        try {
            context.setSource(new InputStreamReader(inStream, "UTF-8"));
            com.process(context);
        } catch (final ConfigurationException e1) {
            fail("ConfigurationException thrown while waiting for HttpException");
            LOGGER.error("Error occured in testProcess:", e1);
        } catch (final UnsupportedEncodingException e) {
            fail("Wrong Encoding thrown while waiting for HttpException");
View Full Code Here


    public void testProcessIOException() {
        final InputStream inStream = this.getClass().getClassLoader()
                .getResourceAsStream("dummyData.xml");
        final Context context = new StandardContext();

        final Command com = new URLMatchCommand(null);

        try {
            context.setSource(new InputStreamReader(inStream, "UTF-8"));
            com.process(context);
        } catch (final ConfigurationException e1) {
            fail("ConfigurationException thrown ");
            LOGGER.error("Error occured in testProcess:", e1);
        } catch (final UnsupportedEncodingException e) {
            fail("Encoding exception thrown ");
View Full Code Here

TOP

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

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.