Examples of DummyServletOutputStream


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

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

    }

    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
Copyright © 2018 www.massapi.com. 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.