Package org.apache.tapestry5.test

Examples of org.apache.tapestry5.test.PageTester


    }
   
    @BeforeMethod
    public void before()
    {
        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);
    }
View Full Code Here


    private PageTester emptyAppNameTester;
   
    @BeforeClass
    public void setup()
    {
        nonEmptyAppNameTester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME, "src/test/app2");
       
        emptyAppNameTester = new PageTester(TestConstants.APP2_PACKAGE, "", "src/test/app2");
    }
View Full Code Here

    private PageTester tester;

    @Test
    public void prefix_method() throws Exception
    {
        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME, PageTester.DEFAULT_CONTEXT_PATH,
                                LocaleAppModule.class);

        Document doc = tester.renderPage("TestPrefixMethod");

        // make sure you can use on methods that have injected fields
View Full Code Here

    private PageTester tester;

    @Test
    public void submit_aso()
    {
        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);

        Document doc = tester.renderPage("TestPageForASO");
        assertTrue(doc.toString().contains("bar"));
    }
View Full Code Here

    private PageTester tester;

    @Test
    public void submit_context_asset()
    {
        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME, "src/test/app2");

        Document doc = tester.renderPage("TestPageForAsset");

        assertTrue(doc.toString().contains("test.css"));
    }
View Full Code Here

    @BeforeMethod
    public void before()
    {
        // LocaleAppModule.java has configured support for a certain locales.
        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);
    }
View Full Code Here

    @Test
    public void click_link()
    {

        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);

        Document doc = tester.renderPage("TestPageForActionLink");
        Element link = doc.getElementById("link1");
        doc = tester.clickLink(link);
        assertTrue(doc.toString().contains("You chose: 123"));
View Full Code Here

    private PageTester tester;

    @Test
    public void display()
    {
        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);

        Document doc = tester.renderPage("TestPageForHead");
        assertTrue(doc.toString().contains("OK"));
    }
View Full Code Here

    }

    @Test(dataProvider = "dtd_page_provider")
    public void verify_correct_dtds(String pageName, String expectedDTD, String checkText)
    {
        PageTester tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);

        Document doc = tester.renderPage(pageName);
        String txt = doc.toString();
        // use startsWith to make sure the DTD is getting into the right spot.
        assertTrue(txt.startsWith(expectedDTD));
        // we should also make sure that the other DTD's don't appear anywhere else...
        checkOtherDTD(txt, expectedDTD);
View Full Code Here

    private PageTester tester;

    @Test
    public void render()
    {
        tester = new PageTester(TestConstants.APP2_PACKAGE, TestConstants.APP2_NAME);

        Document doc = tester.renderPage("TestPageForLoop");
        assertTrue(doc.toString().contains("abcabcabc"));
        assertEquals(doc.getElementById("1").getChildMarkup(), "xyz");
    }
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.