Browse Source

cancel flight instance todo

feature-flight-instance
Imron 3 years ago
parent
commit
c02ff9a11e
  1. 7
      src/main/java/hs/fulda/de/ci/exam/project/FlightInstance.java
  2. 9
      src/test/java/hs/fulda/de/ci/exam/project/FlightInstanceTest.java
  3. BIN
      target/classes/hs/fulda/de/ci/exam/project/FlightInstance.class

7
src/main/java/hs/fulda/de/ci/exam/project/FlightInstance.java

@ -2,6 +2,8 @@ package hs.fulda.de.ci.exam.project;
import java.sql.Time;
import static hs.fulda.de.ci.exam.project.FlightStatus.Cancelled;
public class FlightInstance {
Time departureTime;
String gate;
@ -24,7 +26,12 @@ public class FlightInstance {
public FlightStatus getStatus() {
return this.status;
}
public void updateStatus(FlightStatus status) {
this.status = status;
}
public boolean cancel() {
return true;
}
}

9
src/test/java/hs/fulda/de/ci/exam/project/FlightInstanceTest.java

@ -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 {
@ -33,4 +32,10 @@ class FlightInstanceTest {
assertThat(fInstance1.getStatus()).describedAs("get status of flight isntance").isEqualTo(Arrived);
}
@Test
void cancel_FlightInstance() {
// TODO: 26.01.22 discuss
}
}

BIN
target/classes/hs/fulda/de/ci/exam/project/FlightInstance.class

Loading…
Cancel
Save