Package org.apache.tapestry5.test

Examples of org.apache.tapestry5.test.PageTester


    private PageTester pageTester;

    @BeforeClass
    public void setUp() {
        pageTester = new PageTester("com.tapestry5book", "app");
    }
View Full Code Here


public class ActionLinkDemoTest {
    private PageTester pageTester;

    @BeforeClass
    public void setUp() {
        pageTester = new PageTester("com.tapestry5book", "app", "src/main/webapp");
    }
View Full Code Here

    private PageTester pageTester;

    @BeforeClass
    public void setUp() {
        pageTester = new PageTester("testapp", "app", "src/test/webapp");
    }
View Full Code Here

    private PageTester tester;

    @BeforeMethod
    public void setUp() {
        tester = new PageTester("org.example.testapp", "app", "src/test/webapp", BlogrollModule.class);
    }
View Full Code Here

    private PageTester tester;

    @BeforeMethod
    public void setUp() {
        tester = new PageTester("org.example.testapp", "app", "src/test/webapp", ArchiveModule.class);
    }
View Full Code Here

    @Test
    public void render()
    {
        String appPackage = "org.apache.tapestry5.integration.app2";
        String appName = "";
        tester = new PageTester(appPackage, appName);
        Document doc = tester.renderPage("TestPageForUnless");
        assertNotNull(doc.getElementById("2"));
        assertNotNull(doc.getElementById("4"));
        assertNotNull(doc.getElementById("6"));
        assertNotNull(doc.getElementById("7"));
View Full Code Here

    @Test
    public void render()
    {
        String appPackage = "org.apache.tapestry5.integration.app2";
        String appName = "";
        tester = new PageTester(appPackage, appName);
        Document doc = tester.renderPage("TestPageForIf");
        assertNotNull(doc.getElementById("1"));
        assertNotNull(doc.getElementById("3"));
        assertNotNull(doc.getElementById("5"));
        assertNotNull(doc.getElementById("8"));
View Full Code Here

    @BeforeMethod
    public void before()
    {
        String appPackage = "org.apache.tapestry5.integration.app2";
        String appName = "";
        tester = new PageTester(appPackage, appName);
        doc = tester.renderPage("TestPageForSubmit");
        fieldValues = CollectionFactory.newMap();
    }
View Full Code Here

    @Test
    public void template_in_web_context()
    {
        String appPackage = "org.apache.tapestry5.integration.app2";
        String appName = "";
        tester = new PageTester(appPackage, appName, "src/test/app2");
        Document doc = tester.renderPage("TestPageForTemplateInContext");
        assertTrue(doc.toString().contains("How are you?"));
    }
View Full Code Here

    private static final String PACKAGE = "org.apache.tapestry5.integration.app2";

    @Test
    public void on_activate_chain_is_followed()
    {
        PageTester tester = new PageTester(PACKAGE, "", "src/test/app2");

        Document launchDoc = tester.renderPage("Launch");

        Map<String, String> parameters = Collections.emptyMap();

        // Submit the form, which will then skip through Intermediate and
        // arrive at Final.

        Document finalDoc = tester.submitForm(launchDoc.getElementById("form"), parameters);

        assertEquals(finalDoc.getElementById("page-name").getChildMarkup(), "Final");

        tester.shutdown();
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.test.PageTester

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.