Examples of ProvidersRegistry


Examples of org.apache.wink.common.internal.registry.ProvidersRegistry

                                                         new MediaType("text", "plain"),
                                                         null).getContext(String.class));
    }

    public void testContextResolverNullMediaType() {
        ProvidersRegistry providers = createProvidersRegistryImpl();
        // note: the order these are added is important to the test
        assertTrue(providers.addProvider(new StringContextResolver4()));
        assertTrue(providers.addProvider(new StringContextResolver3()));
        assertTrue(providers.addProvider(new StringContextResolver2()));

        // StringContextResolver2 takes priority over the others due to the
        // media type in @Produces
        assertSame(STRING2, providers.getContextResolver(String.class, null, null)
            .getContext(String.class));
    }
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.