Исходный код вики junit

Версия 1.3 от Alexandr Fokin на 2026/11/05 14:00

Скрыть последних авторов
Alexandr Fokin 1.1 1 |= |=
Alexandr Fokin 1.2 2 |Пример|{{code language="java"}}import org.junit.jupiter.api.DisplayName;
Alexandr Fokin 1.1 3 import org.junit.jupiter.api.Test;
4
5 @DisplayName("Test1")
6 public class Test1 {
7
8 @Test
9 void Case1() {
10 IO.println(String.format("Hello and welcome!"));
11
12 for (int i = 1; i <= 5; i++) {
13 //TIP Press <shortcut actionId="Debug"/> to start debugging your code. We have set one <icon src="AllIcons.Debugger.Db_set_breakpoint"/> breakpoint
14 // for you, but you can always add more by pressing <shortcut actionId="ToggleLineBreakpoint"/>.
15 IO.println("i = " + i);
16 }
17 }
18 }{{/code}}
Alexandr Fokin 1.2 19 |Подключение|(((
Alexandr Fokin 1.3 20 |[[Maven>>doc:Разработка.JVM.Java.Управление проектами и зависимостями.Maven.WebHome]]|{{code language="xml"}}<!-- junit -->
Alexandr Fokin 1.1 21 <dependency>
22 <groupId>org.junit.jupiter</groupId>
23 <artifactId>junit-jupiter</artifactId>
24 <version>5.14.2</version>
25 <scope>test</scope>
26 </dependency>{{/code}}
27 | |
28 )))
29
30