|
|
@ -4,8 +4,7 @@ import org.junit.jupiter.api.Test; |
|
|
|
|
|
|
|
import java.sql.Time; |
|
|
|
|
|
|
|
import static hs.fulda.de.ci.exam.project.FlightStatus.Arrived; |
|
|
|
import static hs.fulda.de.ci.exam.project.FlightStatus.InAir; |
|
|
|
import static hs.fulda.de.ci.exam.project.FlightStatus.*; |
|
|
|
import static org.assertj.core.api.Assertions.*; |
|
|
|
|
|
|
|
class FlightInstanceTest { |
|
|
@ -13,24 +12,30 @@ class FlightInstanceTest { |
|
|
|
FlightInstance fInstance1 = new FlightInstance(today, "G15", InAir); |
|
|
|
|
|
|
|
@Test |
|
|
|
void getDepartureTime(){ |
|
|
|
void getDepartureTime() { |
|
|
|
assertThat(fInstance1.getDepartureTime()).describedAs("get departure time of flight isntance").isEqualTo(Time.valueOf("13:45:40")); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void getGate(){ |
|
|
|
void getGate() { |
|
|
|
assertThat(fInstance1.getGate()).describedAs("get gate number of flight isntance").isEqualTo("G15"); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void getStatus(){ |
|
|
|
void getStatus() { |
|
|
|
assertThat(fInstance1.getStatus()).describedAs("get status of flight isntance").isEqualTo(InAir); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void updateStatus(){ |
|
|
|
void updateStatus() { |
|
|
|
fInstance1.updateStatus(Arrived); |
|
|
|
assertThat(fInstance1.getStatus()).describedAs("get status of flight isntance").isEqualTo(Arrived); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void cancel_FlightInstance() { |
|
|
|
// TODO: 26.01.22 discuss |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |