Search in sources :

Example 31 with Document

use of org.apache.tapestry5.dom.Document in project tapestry-5 by apache.

the class TestableResponseImplTest method action_link.

@Test
public void action_link() {
    Document document = tester.renderPage(TestPageForActionLinkWithStream.class.getSimpleName());
    Element link = document.getElementById("mylink");
    assertNotNull(link);
    TestableResponse response = tester.clickLinkAndReturnResponse(link);
    assertEquals(response.getOutput(), "<html><body>Rendered with TextStreamResponse</body></html>");
}
Also used : TestPageForActionLinkWithStream(org.apache.tapestry5.integration.app2.pages.TestPageForActionLinkWithStream) Element(org.apache.tapestry5.dom.Element) Document(org.apache.tapestry5.dom.Document) Test(org.testng.annotations.Test)

Aggregations

Document (org.apache.tapestry5.dom.Document)20 Test (org.testng.annotations.Test)19 PageTester (org.apache.tapestry5.test.PageTester)11 Element (org.apache.tapestry5.dom.Element)8 MarkupWriter (org.apache.tapestry5.MarkupWriter)4 Document (elemental2.dom.Document)2 Element (elemental2.dom.Element)2 XMLMarkupModel (org.apache.tapestry5.dom.XMLMarkupModel)2 IOException (java.io.IOException)1 DocumentBuilder (javax.xml.parsers.DocumentBuilder)1 XPathExpressionException (javax.xml.xpath.XPathExpressionException)1 TestPageForActionLinkWithStream (org.apache.tapestry5.integration.app2.pages.TestPageForActionLinkWithStream)1 TestPageForHttpHeaders (org.apache.tapestry5.integration.app2.pages.TestPageForHttpHeaders)1 Page (org.apache.tapestry5.internal.structure.Page)1 RenderCommand (org.apache.tapestry5.runtime.RenderCommand)1 ComponentLibraryInfo (org.apache.tapestry5.services.ComponentLibraryInfo)1 Test (org.junit.Test)1 Document (org.w3c.dom.Document)1