Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Javadoc to command-mode testing API #26725

Merged
merged 2 commits into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
public class QuarkusMainTestExtension extends AbstractJvmQuarkusTestExtension
implements BeforeEachCallback, AfterEachCallback, ParameterResolver, BeforeAllCallback, AfterAllCallback {

public static final ExtensionContext.Namespace NAMESPACE = ExtensionContext.Namespace
geoand marked this conversation as resolved.
Show resolved Hide resolved
.create("io.quarkus.test.main.jvm");

PrepareResult prepareResult;
private static boolean hasPerTestResources;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
import java.lang.annotation.Target;

/**
* Annotation for {@link QuarkusMainTest} and {@link QuarkusMainIntegrationTest} used to
* Annotation for {@link QuarkusMainTest} and {@link QuarkusMainIntegrationTest} that is used to launch command line
* applications.
* The annotation is meant to be used on test methods only.
*
* See also {@link LaunchResult} and {@link QuarkusMainLauncher}
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

import java.util.List;

/**
* Contains information about a run (via {@link Launch}) of a command line application.
* The class is meant to be used as a test method parameter giving the test the ability
* to assert various aspects of the run.
*/
public interface LaunchResult {

default String getOutput() {
Expand All @@ -22,4 +27,4 @@ default void echoSystemOut() {
List<String> getErrorStream();

int exitCode();
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
package io.quarkus.test.junit.main;

/**
* The annotation is meant to be used on test methods only and it allows the launching a command line application with
* arbitrary parameters.
*
* See also {@link LaunchResult} and {@link Launch}
*/
public interface QuarkusMainLauncher {

LaunchResult launch(String... args);
Expand Down