@Test void testReturnsNullOnUnavailableParameter() { assertNull(testSubject.createInstance(method, parameters, 0)); verify(configuration).getComponent(String.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);  }