Package de.novanic.eventservice.test.testhelper

Examples of de.novanic.eventservice.test.testhelper.DummyServletOutputStream


{
    @Test
    public void testPrepare() throws Exception {
        HttpServletResponse theResponseMock = mock(HttpServletResponse.class);

        when(theResponseMock.getOutputStream()).thenReturn(new DummyServletOutputStream(new ByteArrayOutputStream()));

        StreamingServerConnector theStreamingServerConnector = new StreamingServerConnector(createConfiguration(0, 700, 90000));
        theStreamingServerConnector.prepare(theResponseMock);
    }
View Full Code Here


    }

    private StreamingServerConnector createStreamingServerConnector(OutputStream anOutputStream, SerializationPolicy aSerializationPolicy, EventServiceConfiguration aConfiguration) throws EventServiceException, IOException {
        HttpServletResponse theResponseMock = mock(HttpServletResponse.class);

        when(theResponseMock.getOutputStream()).thenReturn(new DummyServletOutputStream(anOutputStream));

        final StreamingServerConnector theStreamingServerConnector;
        if(aSerializationPolicy != null) {
            theStreamingServerConnector = new StreamingServerConnector(aConfiguration, aSerializationPolicy);
        } else {
View Full Code Here

TOP

Related Classes of de.novanic.eventservice.test.testhelper.DummyServletOutputStream

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.