Browse Source

getCode()

feature-pr-AirportClass
Imron 3 years ago
parent
commit
3c4404ad9e
  1. 5
      src/main/java/hs/fulda/de/ci/exam/project/Airport.java
  2. 10
      src/test/java/hs/fulda/de/ci/exam/project/AirportClassTest.java

5
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;
}
}

10
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");
}
}
Loading…
Cancel
Save