/** * {@inheritDoc} */ @Override protected boolean match(final Parameter[] parameters, final Object[] arguments) { return ReflectionRecipes.exactMatch(parameters, getContext().getArguments()); }
/** * {@inheritDoc} * * @see ReflectionRecipes#matchArrayEnding(Class[], Object[]) */ @Override protected boolean match(final Parameter[] parameters, final Object[] arguments) { return ReflectionRecipes.matchArrayEnding(parameters, getContext().getArguments()); }
/** {@inheritDoc} */ @Override protected boolean match(final Parameter[] parameters, final Object[] arguments) { return ReflectionRecipes.exactMatch(parameters, getContext().getArguments()); }
/** * {@inheritDoc} * * @see ReflectionRecipes#matchArrayEnding(Class[], Object[]) */ @Override protected boolean match(final Parameter[] parameters, final Object[] arguments) { return ReflectionRecipes.matchArrayEnding(parameters, getContext().getArguments()); }
/** * {@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 (matchingMatcher != null) { return matchingMatcher.getConformingArguments(); } throw new MethodMatcherException("Data provider mismatch", getContext().getMethod(), getContext().getArguments()); } }
/** * {@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 (matchingMatcher != null) { return matchingMatcher.getConformingArguments(); } throw new MethodMatcherException( "Data provider mismatch", getContext().getMethod(), getContext().getArguments()); } }
/** {@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()); }