|
|
@ -2,12 +2,29 @@ package hs.fulda.de.ci.exam.project; |
|
|
|
|
|
|
|
import org.junit.jupiter.api.Test; |
|
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.*; |
|
|
|
import java.util.HashSet; |
|
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.*; |
|
|
|
|
|
|
|
class FlightTest { |
|
|
|
|
|
|
|
|
|
|
|
Address address_fr = new Address("Frankfurt str", "Frankfurt", "Hessen", "63023", "Germany"); |
|
|
|
Airport airport_fr = new Airport("Fraport", address_fr, "1234"); |
|
|
|
|
|
|
|
|
|
|
|
Address address1_ist = new Address("Istanbul str", "Istanbul", "Fatih", "9019", "Turkey"); |
|
|
|
Airport airport1_ist = new Airport("Istanbul", address1_ist, "5678"); |
|
|
|
|
|
|
|
Flight flight1 = new Flight("1", airport_fr, airport1_ist, 140); |
|
|
|
Flight flight2 = new Flight("2", airport1_ist, airport_fr, 120); |
|
|
|
|
|
|
|
FlightInstance fInstance1 = new FlightInstance(); |
|
|
|
|
|
|
|
@Test |
|
|
|
void getInstances() { |
|
|
|
void getInstances_no_instance_should_be_equal() { |
|
|
|
HashSet<FlightInstance> empty_list = new HashSet<>(); |
|
|
|
assertThat(flight1.getInstances()).describedAs("get flight instances of the flight ").isEqualTo(empty_list); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|