-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProcedureTest.java
More file actions
110 lines (85 loc) · 2.23 KB
/
ProcedureTest.java
File metadata and controls
110 lines (85 loc) · 2.23 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
package test;
import base.Airplane;
import base.Cockpit;
import base.PrimaryFlightDisplay;
import logging.LogEngine;
import org.junit.jupiter.api.*;
import recorder.FlightRecorder;
import static org.junit.jupiter.api.Assertions.*;
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
public class ProcedureTest {
private Airplane airplane;
private Cockpit cockpit;
@BeforeEach
public void init() {
LogEngine.instance.init();
FlightRecorder.instance.startup();
FlightRecorder.instance.init();
airplane = new Airplane();
airplane.build();
cockpit = new Cockpit(airplane);
}
@Test
@Order(1)
public void startUpTest() {
cockpit.startup();
// battery
assertEquals(100,PrimaryFlightDisplay.instance.percentage);
}
@Test
@Order(2)
public void taxiTest() {
cockpit.taxi();
// battery
assertNotEquals(100,PrimaryFlightDisplay.instance.percentage);
}
@Test
@Order(3)
public void takeOffTest() {
cockpit.takeoff();
// battery
assertNotEquals(100,PrimaryFlightDisplay.instance.percentage);
}
@Test
@Order(4)
public void climbingTest() {
cockpit.climbing();
// battery
assertNotEquals(100,PrimaryFlightDisplay.instance.percentage);
}
@Test
@Order(5)
public void rightTurnTest() {
cockpit.rightTurn();
// battery
assertNotEquals(100,PrimaryFlightDisplay.instance.percentage);
}
@Test
@Order(6)
public void leftTurnTest() {
cockpit.leftTurn();
// battery
assertNotEquals(100,PrimaryFlightDisplay.instance.percentage);
}
@Test
@Order(7)
public void descentTest() {
cockpit.descent();
// battery
assertNotEquals(100,PrimaryFlightDisplay.instance.percentage);
}
@Test
@Order(8)
public void landingTest() {
cockpit.landing();
// battery
assertNotEquals(100,PrimaryFlightDisplay.instance.percentage);
}
@Test
@Order(9)
public void shutdownTest() {
cockpit.shutdown();
// battery
assertNotEquals(100,PrimaryFlightDisplay.instance.percentage);
}
}