File tree Expand file tree Collapse file tree 3 files changed +34
-31
lines changed
junit-start/src/main/java Expand file tree Collapse file tree 3 files changed +34
-31
lines changed Original file line number Diff line number Diff line change 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+ /// ```
2828module org .junit .start {
2929 requires static transitive org .apiguardian .api ;
3030 requires static transitive org .jspecify ;
Original file line number Diff line number Diff line change 2828import org .junit .platform .launcher .core .LauncherFactory ;
2929import 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" )
3233public 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 }
Original file line number Diff line number Diff line change 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
614package org .junit .start ;
715
You can’t perform that action at this time.
0 commit comments