/*
 * Copyright 2015-2017 the original author or authors.
 *
 * All rights reserved. This program and the accompanying materials are
 * made available under the terms of the Eclipse Public License v1.0 which
 * accompanies this distribution and is available at
 *
 * http://www.eclipse.org/legal/epl-v10.html
 */

package org.junit.jupiter.api.extension;

import static org.junit.platform.commons.meta.API.Usage.Experimental;

import java.util.Iterator;

import org.junit.platform.commons.meta.API;

@API(Experimental)
public interface TestTemplateInvocationContextProvider extends Extension {

	boolean supports(ContainerExtensionContext context);

	Iterator<TestTemplateInvocationContext> provide(ContainerExtensionContext context);

}

@@ -497,157 +497,2726 @@
 I;%0A%0A
-@API(Experimental)%0Apublic interface TestTemplateInvocationContextProvider extends Extension %7B%0A%0A%09boolean supports(ContainerExtensionContext context);%0A
+/**%0A * %7B@code TestTemplateInvocationContextProvider%7D defines the API for%0A * %7B@link Extension Extensions%7D that wish to provide one or multiple contexts%0A * for the invocation of a%0A * %7B@link org.junit.jupiter.api.TestTemplate @TestTemplate%7D method.%0A *%0A * %3Cp%3EThis extension point makes it possible to execute a test template in%0A * different contexts, e.g. with different parameters, by preparing the test%0A * class instance differently, or multiple times without modifying the context.%0A *%0A * %3Cp%3EThis interface defines two methods: %7B@link #supports%7D and%0A * %7B@link #provide%7D. The former is called by the framework to determine whether%0A * this extension wants to act on a test template that is about to be executed.%0A * If so, the latter is called and must return an %7B@link Iterator%7D of%0A * %7B@link TestTemplateInvocationContext%7D instances. Otherwise, this provider is%0A * ignored for the execution of the current test template.%0A *%0A * %3Cp%3EA provider that has returned %7B@code true%7D from its %7B@link #supports%7D%0A * method is called %3Cem%3Eactive%3C/em%3E. When multiple providers are active for a%0A * test template method, the %7B@code Iterators%7D returned by their%0A * %7B@link #provide%7D methods will be chained, i.e. the test template method will%0A * be invoked using the contexts of all active providers.%0A *%0A * %3Cp%3EImplementations must provide a no-args constructor.%0A *%0A * @see org.junit.jupiter.api.TestTemplate%0A * @see TestTemplateInvocationContext%0A * @since 5.0%0A */%0A@API(Experimental)%0Apublic interface TestTemplateInvocationContextProvider extends Extension %7B%0A%0A%09/**%0A%09 * Determine if this provider supports providing invocation contexts for the%0A%09 * test template method represented by the supplied %7B@code context%7D.%0A%09 *%0A%09 * @param context the container extension context for the test template%0A%09 * method about to be invoked; never %7B@code null%7D%0A%09 * @return %7B@code true%7D if this provider can provide invocation contexts%0A%09 * @see #provide%0A%09 * @see ContainerExtensionContext%0A%09 */%0A%09boolean supports(ContainerExtensionContext context);%0A%0A%09/**%0A%09 * Provide %7B@linkplain TestTemplateInvocationContext invocation contexts%7D%0A%09 * for the test template method represented by the supplied %7B@code context%7D.%0A%09 *%0A%09 * %3Cp%3EThis method is only called by the framework if %7B@link #supports%7D has%0A%09 * previously returned %7B@code true%7D for the same%0A%09 * %7B@link ContainerExtensionContext%7D. Thus, it must not return an empty%0A%09 * %7B@code Iterator%7D.%0A%09 *%0A%09 * @param context the container extension context for the test template%0A%09 * method about to be invoked; never %7B@code null%7D%0A%09 * @return an Iterator of TestTemplateInvocationContext instances for the%0A%09 * invocation of the test template method; never %7B@code null%7D or empty%0A%09 * @see #supports%0A%09 * @see ContainerExtensionContext%0A%09 */
 %0A%09It

Document TestTemplateInvocationContextProvider