diff --git a/src/main/java/hs/fulda/de/ci/exam/project/Airport.java b/src/main/java/hs/fulda/de/ci/exam/project/Airport.java index 6ea009f..03173a0 100644 --- a/src/main/java/hs/fulda/de/ci/exam/project/Airport.java +++ b/src/main/java/hs/fulda/de/ci/exam/project/Airport.java @@ -2,9 +2,14 @@ package hs.fulda.de.ci.exam.project; public class Airport { + protected String code; protected String name; public String getName() { return this.name; } + + public String getCode() { + return this.code; + } } diff --git a/src/test/java/hs/fulda/de/ci/exam/project/AirportClassTest.java b/src/test/java/hs/fulda/de/ci/exam/project/AirportClassTest.java index 0fabcc5..101063d 100644 --- a/src/test/java/hs/fulda/de/ci/exam/project/AirportClassTest.java +++ b/src/test/java/hs/fulda/de/ci/exam/project/AirportClassTest.java @@ -9,6 +9,14 @@ public class AirportClassTest { void test_getName(){ Airport airport = new Airport(); airport.name = "fraport"; - assertThat(airport.getName()).describedAs("get list of Flights").isEqualTo("fraport"); + assertThat(airport.getName()).describedAs("get airport name").isEqualTo("fraport"); } + + @Test + void test_getCode(){ + Airport airport = new Airport(); + airport.code = "PC994"; + assertThat(airport.getCode()).describedAs("get airport code").isEqualTo("PC994"); + } + }