Package play.mvc.Results

Examples of play.mvc.Results.StringChunks


    @Test
    public void testStringChunks() throws Throwable {
        final TestChannel<String> testChannel = new TestChannel<String>();
        final Chunks.Out<String> out = new Chunks.Out<String>(testChannel, new ArrayList<F.Callback0>());
        Chunks<String> chunks = new StringChunks() {
            @Override
            public void onReady(Chunks.Out<String> out) {
                out.write("a");
                out.write("b");
                out.close();
            }
        };
        chunks.onReady(out);

        testChannel.expect("a");
        testChannel.expect("b");
        testChannel.expectEOF();
        testChannel.expectEnd();
View Full Code Here

TOP

Related Classes of play.mvc.Results.StringChunks

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.