ServerHttpResponse response = new ServletServerHttpResponse(servletResponse); HandshakeInterceptorChain chain = new HandshakeInterceptorChain(this.interceptors, this.wsHandler); HandshakeFailureException failure = null;
HandshakeInterceptorChain chain = new HandshakeInterceptorChain(this.interceptors, handler); HandshakeFailureException failure = null;
@Test public void applyAfterHandshakeOnly() { HandshakeInterceptorChain chain = new HandshakeInterceptorChain(interceptors, wsHandler); chain.applyAfterHandshake(request, response, null); verifyNoMoreInteractions(i1, i2, i3); }
HandshakeInterceptorChain chain = new HandshakeInterceptorChain(this.interceptors, handler);
@Test public void applyBeforeHandshakeWithFalseReturnValue() throws Exception { given(i1.beforeHandshake(request, response, wsHandler, attributes)).willReturn(true); given(i2.beforeHandshake(request, response, wsHandler, attributes)).willReturn(false); HandshakeInterceptorChain chain = new HandshakeInterceptorChain(interceptors, wsHandler); chain.applyBeforeHandshake(request, response, attributes); verify(i1).beforeHandshake(request, response, wsHandler, attributes); verify(i1).afterHandshake(request, response, wsHandler, null); verify(i2).beforeHandshake(request, response, wsHandler, attributes); verifyNoMoreInteractions(i1, i2, i3); }
@Test public void success() throws Exception { given(i1.beforeHandshake(request, response, wsHandler, attributes)).willReturn(true); given(i2.beforeHandshake(request, response, wsHandler, attributes)).willReturn(true); given(i3.beforeHandshake(request, response, wsHandler, attributes)).willReturn(true); HandshakeInterceptorChain chain = new HandshakeInterceptorChain(interceptors, wsHandler); chain.applyBeforeHandshake(request, response, attributes); verify(i1).beforeHandshake(request, response, wsHandler, attributes); verify(i2).beforeHandshake(request, response, wsHandler, attributes); verify(i3).beforeHandshake(request, response, wsHandler, attributes); verifyNoMoreInteractions(i1, i2, i3); }
HandshakeInterceptorChain chain = new HandshakeInterceptorChain(this.interceptors, handler); HandshakeFailureException failure = null;
ServerHttpResponse response = new ServletServerHttpResponse(servletResponse); HandshakeInterceptorChain chain = new HandshakeInterceptorChain(this.interceptors, this.wsHandler); HandshakeFailureException failure = null;
ServerHttpResponse response = new ServletServerHttpResponse(servletResponse); HandshakeInterceptorChain chain = new HandshakeInterceptorChain(this.interceptors, this.wsHandler); HandshakeFailureException failure = null;
HandshakeInterceptorChain chain = new HandshakeInterceptorChain(this.interceptors, handler); HandshakeFailureException failure = null;
HandshakeInterceptorChain chain = new HandshakeInterceptorChain(this.interceptors, handler);
HandshakeInterceptorChain chain = new HandshakeInterceptorChain(this.interceptors, handler);