Examples of jersey()


Examples of io.dropwizard.setup.Environment.jersey()

    @Test
    public void test() {
        Environment environment = mock(Environment.class);
        JerseyEnvironment jerseyEnvironment = mock(JerseyEnvironment.class);
        when(environment.jersey()).thenReturn(jerseyEnvironment);

        new DBIExceptionsBundle().run(environment);

        verify(jerseyEnvironment, times(1)).register(isA(LoggingSQLExceptionMapper.class));
        verify(jerseyEnvironment, times(1)).register(isA(LoggingDBIExceptionMapper.class));
View Full Code Here

Examples of io.dropwizard.setup.Environment.jersey()

    @Test
    public void testBuild() throws Exception {
        final Environment environment = new Environment("testEnvironment", objectMapper, validator, new MetricRegistry(),
                ClassLoader.getSystemClassLoader());
        environment.jersey().register(new TestResource());
        environment.admin().addTask(new TestTask());

        final Server server = http.build(environment);
        server.start();
View Full Code Here

Examples of io.dropwizard.setup.Environment.jersey()

                ClassLoader.getSystemClassLoader());

        CountDownLatch requestReceived = new CountDownLatch(1);
        CountDownLatch shutdownInvoked = new CountDownLatch(1);

        environment.jersey().register(new TestResource(requestReceived, shutdownInvoked));

        final ScheduledExecutorService executor = Executors.newScheduledThreadPool(3);
        final Server server = http.build(environment);
       
        ((AbstractNetworkConnector)server.getConnectors()[0]).setPort(0);
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.