@Test void testConfigurationContainsRequestedParameter() { ParameterResolver<?> actual = testSubject.createInstance(method, parameters, 1); assertNotNull(actual); assertSame(commandBus, actual.resolveParameterValue(new GenericMessage<>("test"))); verify(configuration).getComponent(CommandBus.class); }
@Override public ParameterResolver<?> createInstance(Executable executable, Parameter[] parameters, int parameterIndex) { Object component = configuration.getComponent(parameters[parameterIndex].getType()); return component == null ? null : new FixedValueParameterResolver<>(component); }
ConfigurationParameterResolverFactory implements ParameterResolverFactory { @Override public ParameterResolver<?> createInstance(Executable executable, Parameter[] parameters, int parameterIndex) { Object component = configuration.getComponent(parameters[parameterIndex].getType()); return component == null ? null : new FixedValueParameterResolver<>(component); } }
ConfigurationParameterResolverFactory implements ParameterResolverFactory { @Override public ParameterResolver<?> createInstance(Executable executable, Parameter[] parameters, int parameterIndex) { Object component = configuration.getComponent(parameters[parameterIndex].getType()); return component == null ? null : new FixedValueParameterResolver<>(component); } ConfigurationParameterResolverFactory(Configuration configuration); }
ConfigurationParameterResolverFactory implements ParameterResolverFactory { @Override public ParameterResolver<?> createInstance(Executable executable, Parameter[] parameters, int parameterIndex) { Object component = configuration.getComponent(parameters[parameterIndex].getType()); return component == null ? null : new FixedValueParameterResolver<>(component); } ConfigurationParameterResolverFactory(Configuration configuration); @Override ParameterResolver<?> createInstance(Executable executable, Parameter[] parameters, int parameterIndex); }
ConfigurationParameterResolverFactory implements ParameterResolverFactory { @Override public ParameterResolver<?> createInstance(Executable executable, Parameter[] parameters, int parameterIndex) { Object component = configuration.getComponent(parameters[parameterIndex].getType()); return component == null ? null : new FixedValueParameterResolver<>(component); } ConfigurationParameterResolverFactory(Configuration configuration); @Override ParameterResolver<?> createInstance(Executable executable, Parameter[] parameters, int parameterIndex);  }