@Test public void chunkingShouldBeTurnedOffIfnochunkParameterIsPresent() throws Exception { MockRequest request = new MockRequest(); request.addInput("nochunk", ""); ChunkedResponse response = (ChunkedResponse) responder.makeResponse(context, request); assertTrue(response.isChunkingTurnedOff()); }
private void createResponder() throws Exception { WikiImporter importer = new WikiImporter(); importer.setDeleteOrphanOption(false); responder = new WikiImportingResponder(importer); responder.path = new WikiPagePath(); ChunkedResponse response = new ChunkedResponse("html", new MockChunkedDataProvider()); response.sendTo(new MockResponseSender()); responder.setResponse(response); }
private ChunkedResponse getResponse(MockRequest request) { ChunkedResponse response = (ChunkedResponse) responder.makeResponse(testData.localContext, request); response.turnOffChunking(); return response; }