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

Редактировал(а) Alexandr Fokin 2026/11/05 15:55

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