-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Decouple CartesianArgumentsProvider from Jupiter Arguments Provider (#…
…520/#519) The CartesianArgumentsProvider supports the Jupiter AnnotationConsumer interface. The CartesianArgumentsProvider has a method for providing arguments that accepts the ExtensionContext and the Parameter for which it provides arguments. closes: #520 PR: #519
- Loading branch information
Showing
10 changed files
with
191 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/main/java/org/junitpioneer/jupiter/cartesian/CartesianArgumentsSource.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright 2016-2021 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 v2.0 which | ||
* accompanies this distribution and is available at | ||
* | ||
* http://www.eclipse.org/legal/epl-v20.html | ||
*/ | ||
|
||
package org.junitpioneer.jupiter.cartesian; | ||
|
||
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; | ||
|
||
/** | ||
* {@code @CartesianArgumentsSource} is an annotation | ||
* that is used to register {@linkplain CartesianArgumentsProvider cartesian argument providers} | ||
* for the annotated test parameter. | ||
* | ||
* <p>{@code @CartesianArgumentsSource} may also be used as a meta-annotation in order to | ||
* create a custom <em>composed annotation</em> that inherits the semantics | ||
* of {@code @CartesianArgumentsSource}. | ||
* | ||
* This is similar to {@link org.junit.jupiter.params.provider.ArgumentsSource ArgumentsSource} and is used | ||
* to provide arguments for {@link CartesianTest}. | ||
* | ||
* @see CartesianTest | ||
*/ | ||
@Target({ ElementType.ANNOTATION_TYPE, ElementType.PARAMETER }) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Documented | ||
public @interface CartesianArgumentsSource { | ||
|
||
/** | ||
* The type of {@link CartesianArgumentsProvider} to be used. | ||
*/ | ||
Class<? extends CartesianArgumentsProvider> value(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.