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