/*
 * Copyright 2015-2016 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.gen5.api;

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

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

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

/**
 * {@code @TestFactory} is used to signal that the annotated method is a
 * <em>test factory</em> method.
 *
 * <p>In contrast to {@link Test @Test} it is not itself a test case but
 * creates test cases. Such a {@link TestFactory @TestFactory} method must
 * return a {@code Stream} or {@code Iterable} of {@link DynamicTest}
 * instances.
 * These {@link DynamicTest DynamicTests} will then be executed lazily
 * enabling dynamic and even non-deterministic generation of test cases.
 *
 * <p>{@code @TestFactory} methods must not be {@code private} or {@code static}.
 *
 * <p>{@code @TestFactory} methods may optionally declare parameters to be
 * resolved by {@link org.junit.gen5.api.extension.ParameterResolver
 * ParameterResolvers}.
 *
 * @since 5.0
 * @see Test
 * @see DynamicTest
 */
@Target({ ElementType.ANNOTATION_TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
@API(Experimental)
public @interface TestFactory {
}

@@ -799,18 +799,39 @@
  @Test%7D 
-it
+methods, a test factory
  is not 
@@ -836,16 +836,19 @@
 t itself
+%0A *
  a test 
@@ -859,57 +859,57 @@
  but
-%0A * creates test cases. Such a %7B@link TestFactory
+ rather a factory for test cases.%0A *%0A * %3Cp%3E%7B@code
  @Te
@@ -929,59 +929,152 @@
 thod
+s
  must
-%0A * return a %7B@code Stream%7D or %7B@code Iterable
+ not be %7B@code private%7D or %7B@code static%7D%0A * and must return a %7B@code Stream%7D, %7B@code Collection%7D, %7B@code Iterable%7D, or%0A * %7B@code Iterator
 %7D of
@@ -1093,19 +1093,16 @@
 micTest%7D
-%0A *
  instanc
@@ -1104,19 +1104,16 @@
 stances.
-%0A *
  These %7B
@@ -1113,32 +1113,20 @@
 These %7B@
-link DynamicTest
+code
  Dynamic
@@ -1131,16 +1131,19 @@
 icTests%7D
+%0A *
  will th
@@ -1163,19 +1163,17 @@
 d lazily
-%0A *
+,
  enablin
@@ -1208,16 +1208,19 @@
 ministic
+%0A *
  generat
@@ -1245,93 +1245,8 @@
 %0A *%0A
- * %3Cp%3E%7B@code @TestFactory%7D methods must not be %7B@code private%7D or %7B@code static%7D.%0A *%0A
  * %3C

Revise Javadoc for @TestFactory