Browse Source

aircraft constructor name

feature-pr-AircraftClass
Imron 3 years ago
parent
commit
17e6f6e76c
  1. 13
      src/main/java/hs/fulda/de/ci/exam/project/Aircraft.java
  2. 15
      src/test/java/hs/fulda/de/ci/exam/project/AircraftTest.java

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

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