|
|
@ -5,6 +5,8 @@ import org.junit.jupiter.api.extension.ExtendWith; |
|
|
|
import org.mockito.Mock; |
|
|
|
import org.mockito.junit.jupiter.MockitoExtension; |
|
|
|
|
|
|
|
import java.util.LinkedList; |
|
|
|
|
|
|
|
import static org.assertj.core.api.Assertions.*; |
|
|
|
|
|
|
|
@ExtendWith(MockitoExtension.class) |
|
|
@ -33,6 +35,16 @@ public class AirportClassTest { |
|
|
|
assertThat(airport.getAddress()).describedAs("get address of airport").isEqualTo(address); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void test_getFlights(){ |
|
|
|
Airport airport = new Airport(); |
|
|
|
LinkedList<Flight> flights = new LinkedList<>(); |
|
|
|
Flight flight1 = new Flight(); |
|
|
|
flights.add(flight1); |
|
|
|
airport.flights = flights; |
|
|
|
assertThat(airport.getFlights()).describedAs("get all flights of the airport").isEqualTo(flights); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|