applicationContext = SpringExtension.getApplicationContext(context);
/** * Resolve a value for the {@link Parameter} in the supplied {@link ParameterContext} by * retrieving the corresponding dependency from the test's {@link ApplicationContext}. * <p>Delegates to {@link ParameterAutowireUtils#resolveDependency}. * @see #supportsParameter * @see ParameterAutowireUtils#resolveDependency */ @Override @Nullable public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext) { Parameter parameter = parameterContext.getParameter(); int index = parameterContext.getIndex(); Class<?> testClass = extensionContext.getRequiredTestClass(); ApplicationContext applicationContext = getApplicationContext(extensionContext); return ParameterAutowireUtils.resolveDependency(parameter, index, testClass, applicationContext); }
@Override public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext) throws ParameterResolutionException { ApplicationContext applicationContext = SpringExtension.getApplicationContext(extensionContext); ZoneSeeder zoneSeeder = new ZoneSeeder(applicationContext); zoneSeeders.add(zoneSeeder); return zoneSeeder; }
@Override protected CmmnEngine createCmmnEngine(ExtensionContext context) { return SpringExtension.getApplicationContext(context).getBean(CmmnEngine.class); }
@Override protected DmnEngine createDmnEngine(ExtensionContext context) { return SpringExtension.getApplicationContext(context).getBean(DmnEngine.class); }
@Override protected FormEngine createFormEngine(ExtensionContext context) { return SpringExtension.getApplicationContext(context).getBean(FormEngine.class); }
/** * Resolve a value for the {@link Parameter} in the supplied {@link ParameterContext} by * retrieving the corresponding dependency from the test's {@link ApplicationContext}. * <p>Delegates to {@link ParameterAutowireUtils#resolveDependency}. * @see #supportsParameter * @see ParameterAutowireUtils#resolveDependency */ @Override public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext) { Parameter parameter = parameterContext.getParameter(); Class<?> testClass = extensionContext.getRequiredTestClass(); ApplicationContext applicationContext = getApplicationContext(extensionContext); return ParameterAutowireUtils.resolveDependency(parameter, testClass, applicationContext); }
/** * Resolve a value for the {@link Parameter} in the supplied {@link ParameterContext} by * retrieving the corresponding dependency from the test's {@link ApplicationContext}. * <p>Delegates to {@link ParameterAutowireUtils#resolveDependency}. * @see #supportsParameter * @see ParameterAutowireUtils#resolveDependency */ @Override @Nullable public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext) { Parameter parameter = parameterContext.getParameter(); int index = parameterContext.getIndex(); Class<?> testClass = extensionContext.getRequiredTestClass(); ApplicationContext applicationContext = getApplicationContext(extensionContext); return ParameterAutowireUtils.resolveDependency(parameter, index, testClass, applicationContext); }
applicationContext = SpringExtension.getApplicationContext(context);
applicationContext = SpringExtension.getApplicationContext(context);
/** * Resolve a value for the {@link Parameter} in the supplied {@link ParameterContext} by * retrieving the corresponding dependency from the test's {@link ApplicationContext}. * <p>Delegates to {@link ParameterAutowireUtils#resolveDependency}. * @see #supportsParameter * @see ParameterAutowireUtils#resolveDependency */ @Override @Nullable public Object resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext) { Parameter parameter = parameterContext.getParameter(); int index = parameterContext.getIndex(); Class<?> testClass = extensionContext.getRequiredTestClass(); ApplicationContext applicationContext = getApplicationContext(extensionContext); return ParameterAutowireUtils.resolveDependency(parameter, index, testClass, applicationContext); }