Skip to content

Commit 75fc69b

Browse files
committed
Add Javadoc
1 parent 8d5fa59 commit 75fc69b

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherDiscoveryRequestBuilder.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
package org.junit.platform.launcher.core;
1212

1313
import static org.apiguardian.api.API.Status.DEPRECATED;
14+
import static org.apiguardian.api.API.Status.EXPERIMENTAL;
1415
import static org.apiguardian.api.API.Status.STABLE;
1516
import static org.junit.platform.launcher.LauncherConstants.OUTPUT_DIR_PROPERTY_NAME;
1617

@@ -30,6 +31,7 @@
3031
import org.junit.platform.engine.Filter;
3132
import org.junit.platform.engine.reporting.OutputDirectoryProvider;
3233
import org.junit.platform.launcher.EngineFilter;
34+
import org.junit.platform.launcher.LauncherConstants;
3335
import org.junit.platform.launcher.LauncherDiscoveryListener;
3436
import org.junit.platform.launcher.LauncherDiscoveryRequest;
3537
import org.junit.platform.launcher.PostDiscoveryFilter;
@@ -287,6 +289,21 @@ public LauncherDiscoveryRequestBuilder listeners(LauncherDiscoveryListener... li
287289
return this;
288290
}
289291

292+
/**
293+
* Set the {@link OutputDirectoryProvider} to use for the request.
294+
*
295+
* <p>If not specified, a default provider will be used that can be
296+
* configured via the {@value LauncherConstants#OUTPUT_DIR_PROPERTY_NAME}
297+
* configuration parameter.
298+
*
299+
* @param outputDirectoryProvider the output directory provider to use;
300+
* never {@code null}
301+
* @return this builder for method chaining
302+
* @since 1.12
303+
* @see OutputDirectoryProvider
304+
* @see LauncherConstants#OUTPUT_DIR_PROPERTY_NAME
305+
*/
306+
@API(status = EXPERIMENTAL, since = "1.12")
290307
public LauncherDiscoveryRequestBuilder outputDirectoryProvider(OutputDirectoryProvider outputDirectoryProvider) {
291308
this.outputDirectoryProvider = Preconditions.notNull(outputDirectoryProvider,
292309
"outputDirectoryProvider must not be null");

junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EngineTestKit.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,19 @@ public Builder enableImplicitConfigurationParameters(boolean enabled) {
427427
return this;
428428
}
429429

430+
/**
431+
* Set the {@link OutputDirectoryProvider} to use.
432+
*
433+
* <p>If not specified, a default provider will be used that throws an
434+
* exception when attempting to create output directories. This is done
435+
* to avoid accidentally writing output files to the file system.
436+
*
437+
* @param outputDirectoryProvider the output directory provider to use;
438+
* never {@code null}
439+
* @return this builder for method chaining
440+
* @since 1.12
441+
* @see OutputDirectoryProvider
442+
*/
430443
@API(status = EXPERIMENTAL, since = "1.12")
431444
public Builder outputDirectoryProvider(OutputDirectoryProvider outputDirectoryProvider) {
432445
this.requestBuilder.outputDirectoryProvider(outputDirectoryProvider);

0 commit comments

Comments
 (0)