-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJunit5Annotations.java
More file actions
59 lines (47 loc) · 1.66 KB
/
Junit5Annotations.java
File metadata and controls
59 lines (47 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package docs;
import org.junit.jupiter.api.*;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class Junit5Annotations {
@BeforeAll
static void setup() {
System.out.println("setup here");
}
@BeforeEach
void each() {
System.out.println(" beforeEach here");
}
@BeforeEach
void one_more() {
System.out.println(" beforeMoreEach here");
}
@Test
@DisplayName("Some test")
void someTest() {
System.out.println(" someTest here");
assertTrue(true);
}
@Test
@DisplayName("Another test")
void anotherTest() {
System.out.println(" anotherTest here");
assertTrue(true);
}
@AfterEach
void after() {
System.out.println(" afterEach here");
}
@AfterAll
static void shutDown() {
System.out.println("shutdown here");
}
// setup here
// beforeEach here
// beforeMoreEach here
// anotherTest here
// afterEach here
// beforeEach here
// beforeMoreEach here
// someTest here
// afterEach here
// shutdown here
}