Skip to content

Commit 13cabb8

Browse files
committed
Use Markdown syntax in API documentation
1 parent dea7a32 commit 13cabb8

File tree

3 files changed

+34
-31
lines changed

3 files changed

+34
-31
lines changed

junit-start/src/main/java/module-info.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@
88
* https://www.eclipse.org/legal/epl-v20.html
99
*/
1010

11-
/**
12-
* Defines the API of the JUnit Start module for writing and running tests.
13-
* <p>
14-
* Usage example:
15-
* <pre>{@code
16-
* import module org.junit.start;
17-
*
18-
* void main() {
19-
* JUnit.run();
20-
* }
21-
*
22-
* @Test
23-
* void addition() {
24-
* Assertions.assertEquals(2, 1 + 1, "Addition error detected!");
25-
* }
26-
* }</pre>
27-
*/
11+
12+
/// Defines the API of the JUnit Start module for writing and running tests.
13+
///
14+
/// Usage example:
15+
/// ```java
16+
/// import module org.junit.start;
17+
///
18+
/// void main() {
19+
/// JUnit.run();
20+
/// }
21+
///
22+
/// @Test
23+
/// void addition() {
24+
/// Assertions.assertEquals(2, 1 + 1, "Addition error detected!");
25+
/// }
26+
/// }
27+
/// ```
2828
module org.junit.start {
2929
requires static transitive org.apiguardian.api;
3030
requires static transitive org.jspecify;

junit-start/src/main/java/org/junit/start/JUnit.java

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,23 @@
2828
import org.junit.platform.launcher.core.LauncherFactory;
2929
import org.junit.platform.launcher.listeners.SummaryGeneratingListener;
3030

31-
@API(status = EXPERIMENTAL, since = "6.0")
31+
/// This class provides simple helpers to discover and execute tests.
32+
@API(status = EXPERIMENTAL, since = "6.1")
3233
public final class JUnit {
33-
/**
34-
* Run all tests defined in the caller class.
35-
*/
34+
/// Run all tests defined in the caller class.
3635
public static void run() {
3736
var walker = StackWalker.getInstance(RETAIN_CLASS_REFERENCE);
3837
run(selectClass(walker.getCallerClass()));
3938
}
4039

41-
/**
42-
* Run all tests defined in the given test class.
43-
* @param testClass the class to discover and execute tests in
44-
*/
40+
/// Run all tests defined in the given test class.
41+
/// @param testClass the class to discover and execute tests in
4542
public static void run(Class<?> testClass) {
4643
run(selectClass(testClass));
4744
}
4845

49-
/**
50-
* Run all tests defined in the given module.
51-
* @param testModule the module to discover and execute tests in
52-
*/
46+
/// Run all tests defined in the given module.
47+
/// @param testModule the module to discover and execute tests in
5348
public static void run(Module testModule) {
5449
run(selectModule(testModule));
5550
}

junit-start/src/main/java/org/junit/start/package-info.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
/**
2-
* Contains JUnit Start API for writing and running tests.
1+
/*
2+
* Copyright 2015-2025 the original author or authors.
3+
*
4+
* All rights reserved. This program and the accompanying materials are
5+
* made available under the terms of the Eclipse Public License v2.0 which
6+
* accompanies this distribution and is available at
7+
*
8+
* https://www.eclipse.org/legal/epl-v20.html
39
*/
410

11+
/// Contains JUnit Start API for writing and running tests.
12+
513
@NullMarked
614
package org.junit.start;
715

0 commit comments

Comments
 (0)