Example usage for org.apache.wicket.protocol.http.mock MockHttpServletResponse getDocument

List of usage examples for org.apache.wicket.protocol.http.mock MockHttpServletResponse getDocument

Introduction

In this page you can find the example usage for org.apache.wicket.protocol.http.mock MockHttpServletResponse getDocument.

Prototype

public String getDocument() 

Source Link

Document

Get the text document that was written as part of this response.

Usage

From source file:de.micromata.genome.junittools.wicket.WicketTestBuilder.java

License:Apache License

public String _getLastDocResponseAsString() {
    List<MockHttpServletResponse> prevrps = tester.getPreviousResponses();
    for (int i = prevrps.size() - 1; i >= 0; --i) {
        MockHttpServletResponse prevreq = prevrps.get(i);
        String doc = prevreq.getDocument();
        if (doc.contains("<ajax-response>") == false) {
            return doc;
        }/* w w w .  j av  a 2 s  .c o m*/
    }
    String curresp = tester.getLastResponseAsString();
    return curresp;
}