Package org.apache.http

Examples of org.apache.http.UnsupportedHttpVersionException


        this.connContext.setAttribute(HttpAsyncService.HTTP_EXCHANGE_STATE, state);
        Mockito.when(this.decoder.isCompleted()).thenReturn(true);
        Mockito.when(this.requestConsumer.getException()).thenReturn(null);
        Object data = new Object();
        Mockito.when(this.requestConsumer.getResult()).thenReturn(data);
        Mockito.doThrow(new UnsupportedHttpVersionException()).when(
                this.requestHandler).handle(
                        Mockito.eq(data),
                        Mockito.any(HttpAsyncExchange.class),
                        Mockito.eq(exchangeContext));
View Full Code Here


        final HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_1, 200, "OK");
        Mockito.when(responseFactory.newHttpResponse(HttpVersion.HTTP_1_1, 200, context)).thenReturn(response);
        final HttpResponse error = new BasicHttpResponse(HttpVersion.HTTP_1_0, 500, "Oppsie");
        Mockito.when(responseFactory.newHttpResponse(HttpVersion.HTTP_1_0, 500, context)).thenReturn(error);
        Mockito.when(handlerResolver.lookup(request)).thenReturn(requestHandler);
        Mockito.doThrow(new UnsupportedHttpVersionException()).when(
                requestHandler).handle(request, response, context);
        Mockito.when(connReuseStrategy.keepAlive(error, context)).thenReturn(Boolean.FALSE);

        httpservice.handleRequest(conn, context);
View Full Code Here

        this.connContext.setAttribute(HttpAsyncService.HTTP_EXCHANGE_STATE, state);
        Mockito.when(this.decoder.isCompleted()).thenReturn(Boolean.TRUE);
        Mockito.when(this.requestConsumer.getException()).thenReturn(null);
        final Object data = new Object();
        Mockito.when(this.requestConsumer.getResult()).thenReturn(data);
        Mockito.doThrow(new UnsupportedHttpVersionException()).when(
                this.requestHandler).handle(
                        Mockito.eq(data),
                        Mockito.any(HttpAsyncExchange.class),
                        Mockito.eq(exchangeContext));
View Full Code Here

  
   @Test
   public void testAlternativeMapperApplicationClasses() throws Exception
   {
      beforeApplicationClasses(TestClientExceptionMapper.class);
      doTestWithAlternativeMapper(new TestException(null), new UnsupportedHttpVersionException());
   }
View Full Code Here

  
   @Test
   public void testAlternativeMapperApplicationSingleton() throws Exception
   {
      beforeApplicationSingleton(new TestClientExceptionMapper());
      doTestWithAlternativeMapper(new TestException(null), new UnsupportedHttpVersionException());
   }
View Full Code Here

  
   @Test
   public void testAlternativeMapperContextParams() throws Exception
   {
      beforeContextParams(TestClientExceptionMapper.class);
      doTestWithAlternativeMapper(new TestException(null), new UnsupportedHttpVersionException());
   }
View Full Code Here

  
   @Test
   public void testAlternativeMapperInitParams() throws Exception
   {
      beforeInitParams(TestClientExceptionMapper.class);
      doTestWithAlternativeMapper(new TestException(null), new UnsupportedHttpVersionException());
   }
View Full Code Here

   }

   @Test
   public void testUnsupportedHttpVersionException() throws Exception
   {
      doTest(new ResteasyUnsupportedHttpVersionException(), new UnsupportedHttpVersionException());
   }
View Full Code Here

    
   @Test
   public void testAlternativeMapperProviderInstance() throws Exception
   {
      beforeProviderInstance(new TestClientExceptionMapper());
      doTestWithAlternativeMapper(new TestException(null), new UnsupportedHttpVersionException());
   }
View Full Code Here

  
   @Test
   public void testAlternativeMapperClassName() throws Exception
   {
      beforeClassNames(TestClientExceptionMapper.class);
      doTestWithAlternativeMapper(new TestException(null), new UnsupportedHttpVersionException());
   }
View Full Code Here

TOP

Related Classes of org.apache.http.UnsupportedHttpVersionException

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.