@Test void testIgnoredWhenMessageHandlingMethodHasResourceParameterOfDifferentType() { ParameterResolver resolver = testSubject.createInstance(messageHandlingMethodWithResourceParameterOfDifferentType, messageHandlingMethodWithResourceParameterOfDifferentType.getParameters(), 1); assertNull(resolver); }
@Override public ParameterResolver createInstance(Executable executable, Parameter[] parameters, int parameterIndex) { for (Object resource : resources) { if (parameters[parameterIndex].getType().isInstance(resource)) { return new FixedValueParameterResolver<>(resource); } } return null; }
SimpleResourceParameterResolverFactory implements ParameterResolverFactory { @Override public ParameterResolver createInstance(Executable executable, Parameter[] parameters, int parameterIndex) { for (Object resource : resources) { if (parameters[parameterIndex].getType().isInstance(resource)) { return new FixedValueParameterResolver<>(resource); } } return null; } }
SimpleResourceParameterResolverFactory implements ParameterResolverFactory { @Override public ParameterResolver createInstance(Executable executable, Parameter[] parameters, int parameterIndex) { for (Object resource : resources) { if (parameters[parameterIndex].getType().isInstance(resource)) { return new FixedValueParameterResolver<>(resource); } } return null; } SimpleResourceParameterResolverFactory(Iterable<?> resources); }
SimpleResourceParameterResolverFactory implements ParameterResolverFactory { @Override public ParameterResolver createInstance(Executable executable, Parameter[] parameters, int parameterIndex) { for (Object resource : resources) { if (parameters[parameterIndex].getType().isInstance(resource)) { return new FixedValueParameterResolver<>(resource); } } return null; } SimpleResourceParameterResolverFactory(Iterable<?> resources); @Override ParameterResolver createInstance(Executable executable, Parameter[] parameters, int parameterIndex); }
SimpleResourceParameterResolverFactory implements ParameterResolverFactory { @Override public ParameterResolver createInstance(Executable executable, Parameter[] parameters, int parameterIndex) { for (Object resource : resources) { if (parameters[parameterIndex].getType().isInstance(resource)) { return new FixedValueParameterResolver<>(resource); } } return null; } SimpleResourceParameterResolverFactory(Iterable<?> resources); @Override ParameterResolver createInstance(Executable executable, Parameter[] parameters, int parameterIndex);  }