/** * {@inheritDoc} */ @Override public Object[] getConformingArguments() { if (getConforms() == null) { conforms(); } if (getConformingParameters() == null) { throw new MethodMatcherException(this.getClass().getSimpleName() + " mismatch", getContext().getMethod(), getContext().getArguments()); } return ReflectionRecipes.inject( getContext().getMethodParameter(), InjectableParameter.Assistant.ALL_INJECTS, matchingArguments(getConformingParameters(), getContext().getArguments()), getContext().getMethod(), getContext().getTestContext(), getContext().getTestResult() ); }
/** * {@inheritDoc} */ @Override protected boolean hasConformance() { boolean matching = false; for (final Set<InjectableParameter> injects : getConformanceInjectsOrder()) { final Parameter[] parameters = ReflectionRecipes.filter(getContext().getMethodParameter(), injects); matching = match(parameters, getContext().getArguments()); if (matching) { conformingParameters = parameters; break; } } return matching; }
/** {@inheritDoc} */ @Override public Object[] getConformingArguments() { if (getConforms() == null) { conforms(); } if (getConformingParameters() == null) { throw new MethodMatcherException( this.getClass().getSimpleName() + " mismatch", getContext().getMethod(), getContext().getArguments()); } return ReflectionRecipes.inject( getContext().getMethodParameter(), InjectableParameter.Assistant.ALL_INJECTS, matchingArguments(getConformingParameters(), getContext().getArguments()), getContext().getMethod(), getContext().getTestContext(), getContext().getTestResult()); }
/** {@inheritDoc} */ @Override protected boolean hasConformance() { boolean matching = false; for (final Set<InjectableParameter> injects : getConformanceInjectsOrder()) { final Parameter[] parameters = ReflectionRecipes.filter(getContext().getMethodParameter(), injects); matching = match(parameters, getContext().getArguments()); if (matching) { conformingParameters = parameters; break; } } return matching; }