Browse Source

Merge commit '205cfbf9b8efac875286643e66ed167922632da6' into HEAD

feature-pr-AirlineClass
JenkinsSonaImron 3 years ago
parent
commit
2f62aed493
  1. 29
      src/main/java/hs/fulda/de/ci/exam/project/Person.java
  2. 30
      src/test/java/hs/fulda/de/ci/exam/project/PersonTest.java
  3. BIN
      target/classes/hs/fulda/de/ci/exam/project/Person.class
  4. BIN
      target/test-classes/hs/fulda/de/ci/exam/project/PersonTest.class

29
src/main/java/hs/fulda/de/ci/exam/project/Person.java

@ -0,0 +1,29 @@
package hs.fulda.de.ci.exam.project;
import java.util.HashSet;
public class Person {
private String name;
private Address address;
private String email;
private String phone;
public Person(String name, Address address, String email, String phone) {
this.name = name;
this.address = address;
this.email = email;
this.phone = phone;
}
public String getName() {
return name;
}
public Address getAddress() {
return address;
}
public String getEmail() {
return email;
}
public String getPhone() {
return phone;
}
}

30
src/test/java/hs/fulda/de/ci/exam/project/PersonTest.java

@ -0,0 +1,30 @@
package hs.fulda.de.ci.exam.project;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class PersonTest {
Address address1 = new Address("Fuldaer str", "Fulda", "Hessen", "36037", "Germany");
Person person1 = new Person("Max Mustermann", address1, "max.mustermann@gmail.com", "015147890206");
@Test
void test_getName() {
assertThat(person1.getName()).describedAs("get person name").isEqualTo("Max Mustermann");
}
@Test
void test_getAddress() {
assertThat(person1.getAddress()).describedAs("get address of person").isEqualTo(address1);
}
@Test
void test_getEmail() {
assertThat(person1.getEmail()).describedAs("get person email").isEqualTo("max.mustermann@gmail.com");
}
@Test
void test_getPhone() {
assertThat(person1.getPhone()).describedAs("get person phone").isEqualTo("015147890206");
}
}

BIN
target/classes/hs/fulda/de/ci/exam/project/Person.class

BIN
target/test-classes/hs/fulda/de/ci/exam/project/PersonTest.class

Loading…
Cancel
Save