Skip to content

Commit

Permalink
Add JavaDoc to both new extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Merdes authored and marcphilipp committed Nov 25, 2016
1 parent 20598ff commit 3ed81f0
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,36 @@

import java.util.function.Function;

import org.junit.Rule;
import org.junit.jupiter.api.extension.AfterEachCallback;
import org.junit.jupiter.api.extension.BeforeEachCallback;
import org.junit.jupiter.api.extension.TestExtensionContext;
import org.junit.jupiter.migrationsupport.rules.adapter.AbstractTestRuleAdapter;
import org.junit.jupiter.migrationsupport.rules.adapter.ExternalResourceAdapter;
import org.junit.jupiter.migrationsupport.rules.member.RuleAnnotatedMember;
import org.junit.platform.commons.meta.API;
import org.junit.rules.TestRule;
import org.junit.rules.Verifier;

/**
* This {@code Extension} provides native support for subclasses of
* the {@code Verifier} rule from JUnit 4.
* {@code Rule}-annotated fields as well as methods are supported.
*
* <p>By using this class-level extension on a test class such
* {@code Verifier} implementations in legacy code bases
* can be left unchanged including the JUnit 4 rule import statements.
*
* <p>However, if you intend to develop a <em>new</em> extension for
* JUnit 5 please use the new extension model of JUnit Jupiter instead
* of the rule-based model of JUnit 4.
*
*
* @since 5.0
* @see Verifier
* @see TestRule
* @see Rule
*/

@API(Experimental)
public class ExternalResourceSupport implements BeforeEachCallback, AfterEachCallback {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,35 @@

import java.util.function.Function;

import org.junit.Rule;
import org.junit.jupiter.api.extension.AfterEachCallback;
import org.junit.jupiter.api.extension.TestExtensionContext;
import org.junit.jupiter.migrationsupport.rules.adapter.AbstractTestRuleAdapter;
import org.junit.jupiter.migrationsupport.rules.adapter.VerifierAdapter;
import org.junit.jupiter.migrationsupport.rules.member.RuleAnnotatedMember;
import org.junit.platform.commons.meta.API;
import org.junit.rules.ExternalResource;
import org.junit.rules.TestRule;

/**
* This {@code Extension} provides native support for subclasses of
* the {@code ExternalResource} rule from JUnit 4.
* {@code Rule}-annotated fields as well as methods are supported.
* <p>By using this class-level extension on a test class such
* {@code ExternalResource} implementations in legacy code bases
* can be left unchanged including the JUnit 4 rule import statements.
*
* <p>However, if you intend to develop a <em>new</em> extension for
* JUnit 5 please use the new extension model of JUnit Jupiter instead
* of the rule-based model of JUnit 4.
*
*
* @since 5.0
* @see ExternalResource
* @see TestRule
* @see Rule
*/
@API(Experimental)
public class VerifierSupport implements AfterEachCallback {

Expand Down

0 comments on commit 3ed81f0

Please sign in to comment.