diff --git a/src/main/java/hs/fulda/de/ci/exam/project/Aircraft.java b/src/main/java/hs/fulda/de/ci/exam/project/Aircraft.java new file mode 100644 index 0000000..c4fc3b1 --- /dev/null +++ b/src/main/java/hs/fulda/de/ci/exam/project/Aircraft.java @@ -0,0 +1,13 @@ +package hs.fulda.de.ci.exam.project; + +public class Aircraft { + private String name; + + public Aircraft(String name, String model, int manufacturingYear) { + this.name = name; + } + + public String getName() { + return this.name; + } +} diff --git a/src/test/java/hs/fulda/de/ci/exam/project/AircraftTest.java b/src/test/java/hs/fulda/de/ci/exam/project/AircraftTest.java new file mode 100644 index 0000000..1ee2bb0 --- /dev/null +++ b/src/test/java/hs/fulda/de/ci/exam/project/AircraftTest.java @@ -0,0 +1,15 @@ +package hs.fulda.de.ci.exam.project; + +import org.junit.Test; + +import static org.assertj.core.api.Assertions.*; + +public class AircraftTest { + @Test + public void testClassAircraftConstructorName(){ + Aircraft testAircraft = new Aircraft("Airbus", "Neo", 1990); + assertThat(testAircraft.getName()) + .describedAs("get the name of aircraft") + .isEqualTo("Airbus"); + } +}