org.springframework.plugin.core.SimplePluginRegistry Java Examples
The following examples show how to use
org.springframework.plugin.core.SimplePluginRegistry.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PageableParameterBuilderPluginTest.java From jhipster with Apache License 2.0 | 6 votes |
@BeforeEach public void setup() throws Exception { MockitoAnnotations.initMocks(this); Method method = this.getClass().getMethod("test", new Class<?>[]{Pageable.class, Integer.class}); resolver = new TypeResolver(); RequestHandler handler = new WebMvcRequestHandler(new HandlerMethodResolver(resolver), null, new HandlerMethod(this, method)); DocumentationContext docContext = mock(DocumentationContext.class); RequestMappingContext reqContext = new RequestMappingContext(docContext, handler); builder = spy(new OperationBuilder(null)); context = new OperationContext(builder, RequestMethod.GET, reqContext, 0); List<TypeNameProviderPlugin> plugins = new LinkedList<>(); extractor = new TypeNameExtractor(resolver, SimplePluginRegistry.create(plugins), new JacksonEnumTypeDeterminer()); plugin = new PageableParameterBuilderPlugin(extractor, resolver); }
Example #2
Source File: SwaggerPluginsAutoConfigurationTest.java From jhipster with Apache License 2.0 | 5 votes |
@Test public void testPageableParameterBuilderPlugin() { TypeResolver resolver = new TypeResolver(); List<TypeNameProviderPlugin> plugins = new LinkedList<>(); TypeNameExtractor extractor = new TypeNameExtractor(resolver, SimplePluginRegistry.create(plugins), new JacksonEnumTypeDeterminer()); PageableParameterBuilderPlugin plugin = pagePluginConfig.pageableParameterBuilderPlugin(extractor, resolver); assertThat(plugin.getResolver()).isEqualTo(resolver); assertThat(plugin.getNameExtractor()).isEqualTo(extractor); }
Example #3
Source File: ExamplePluginRegistryTest.java From fullstop with Apache License 2.0 | 5 votes |
@Before public void setUp() { event = Mockito.mock(CloudTrailEvent.class); eventData = Mockito.mock(CloudTrailEventData.class); final List<FullstopPlugin> plugins = new ArrayList<>(); plugins.add(new ExamplePlugin()); pluginRegistry = SimplePluginRegistry.create(plugins); }
Example #4
Source File: LocalPluginProcessor.java From fullstop with Apache License 2.0 | 5 votes |
public LocalPluginProcessor(final FullstopPlugin fullstopPlugin) { Assert.notNull(fullstopPlugin, "Plugin should never be null"); final List<FullstopPlugin> plugins = Lists.newArrayList(); plugins.add(fullstopPlugin); final PluginRegistry<FullstopPlugin, CloudTrailEvent> pluginRegistry = SimplePluginRegistry.create(plugins); pluginEventProcessor = new PluginEventsProcessor(pluginRegistry); }
Example #5
Source File: SwaggerConfig.java From POC with Apache License 2.0 | 4 votes |
@Bean public LinkDiscoverers discoverers() { List<LinkDiscoverer> plugins = new ArrayList<>(); plugins.add(new CollectionJsonLinkDiscoverer()); return new LinkDiscoverers(SimplePluginRegistry.of(plugins)); }