Package org.apache.click

Examples of org.apache.click.MockContainer.stop()


        FileField fileField1 = (FileField) page.getForm().getField("upload1");
        FileField fileField2 = (FileField) page.getForm().getField("upload2");
        assertEquals("upload1 success", fileField1.getFileItem().getString());
        assertEquals("upload2 success", fileField2.getFileItem().getString());

        container.stop();
    }
}
View Full Code Here


        assertTrue(form.toString().indexOf("<form") > 0);
        assertTrue(form.getHtmlImports().indexOf("/control.js") > 0);
        assertTrue(form.getHtmlImports().indexOf("/control.css") > 0);
        assertTrue(form.getHtmlImports().indexOf("/extras-control.css") > 0);
       
        container.stop();
    }
}
View Full Code Here

        assertTrue(form.toString().indexOf("<form") > 0);
        assertTrue(form.getHeadElements().toString().indexOf("/control.js") > 0);
        assertTrue(form.getHeadElements().toString().indexOf("/control.css") > 0);
        assertTrue(form.getHeadElements().toString().indexOf("/extras-control.css") > 0);
       
        container.stop();
    }
}
View Full Code Here

        assertEquals(null, config.getLocale());
        assertEquals(Collections.EMPTY_LIST, config.getPageClassList());
        // Check deployed resource
        assertTrue(new File(tmpdir, "click/control.css").exists());

        container.stop();

        deleteDir(tmpdir);
    }

    public void testLocale() throws Exception {
View Full Code Here

        ConfigService config = ClickUtils.getConfigService(container.getServletContext());

        assertEquals(Locale.UK, config.getLocale());
        assertEquals("iso8859-1", config.getCharset());

        container.stop();

        deleteDir(tmpdir);
    }

    public void testExcludes() throws Exception {
View Full Code Here

        assertFalse(BinaryPage.class.isAssignableFrom(pageClass));

        container.testPage("/BinaryPage.htm");
        assertEquals("template", container.getResponse().getDocument());

        container.stop();

        deleteDir(tmpdir);
    }

    public void testProduction() throws Exception {
View Full Code Here

        ConfigService config = ClickUtils.getConfigService(container.getServletContext());

        assertEquals(true, config.isProductionMode());
        assertEquals(false, config.isProfileMode());

        container.stop();

        deleteDir(tmpdir);
    }

    public void testProfile() throws Exception {
View Full Code Here

        ConfigService config = ClickUtils.getConfigService(container.getServletContext());

        assertEquals(false, config.isProductionMode());
        assertEquals(true, config.isProfileMode());

        container.stop();

        deleteDir(tmpdir);
    }

    public void testDebug() throws Exception {
View Full Code Here

        ConfigService config = ClickUtils.getConfigService(container.getServletContext());

        assertEquals(false, config.isProductionMode());
        assertEquals(false, config.isProfileMode());

        container.stop();

        deleteDir(tmpdir);
    }

    public void testPageByPath() throws Exception {
View Full Code Here

        ArrayList<Class<? extends Page>> list = new ArrayList<Class<? extends Page>>();
        list.add(org.apache.click.pages.BinaryPage.class);
        assertEquals(list, config.getPageClassList());

        container.stop();

        deleteDir(tmpdir);
    }

    public void testPageByClass() throws Exception {
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.