diff --git a/.idea/.gitignore b/.idea/.gitignore index 61d6df2..eb516de 100644 --- a/.idea/.gitignore +++ b/.idea/.gitignore @@ -7,6 +7,7 @@ /dataSources/ /dataSources.local.xml /target +target/ pom.xml.tag pom.xml.releaseBackup pom.xml.versionsBackup diff --git a/src/main/java/hs/fulda/de/ci/exam/project/Address.java b/src/main/java/hs/fulda/de/ci/exam/project/Address.java index 2fd7b89..56f5d4d 100644 --- a/src/main/java/hs/fulda/de/ci/exam/project/Address.java +++ b/src/main/java/hs/fulda/de/ci/exam/project/Address.java @@ -17,12 +17,6 @@ public class Address { @Override public String toString() { - return "Address{" + - "streetAddress='" + streetAddress + '\'' + - ", city='" + city + '\'' + - ", state='" + state + '\'' + - ", zipCode='" + zipCode + '\'' + - ", country='" + country + '\'' + - '}'; + return streetAddress + ", " + city + ", " + state + ", " + zipCode + ", " + country; } } diff --git a/src/test/java/hs/fulda/de/ci/exam/project/AddressTest.java b/src/test/java/hs/fulda/de/ci/exam/project/AddressTest.java index 60ccf8f..f1824d3 100644 --- a/src/test/java/hs/fulda/de/ci/exam/project/AddressTest.java +++ b/src/test/java/hs/fulda/de/ci/exam/project/AddressTest.java @@ -1,17 +1,13 @@ package hs.fulda.de.ci.exam.project; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.*; +import static org.assertj.core.api.Assertions.*; class AddressTest { - @BeforeEach - void setUp() { - } - @Test - void testToString() { + void testToString_Adress() { + Address address_fr = new Address("Frankfurt str 12", "Frankfurt", "Hessen", "63023", "Germany"); + assertThat(address_fr.toString()).describedAs(" get address ").isEqualTo("Frankfurt str 12, Frankfurt, Hessen, 63023, Germany"); } } \ No newline at end of file diff --git a/target/classes/hs/fulda/de/ci/exam/project/Address.class b/target/classes/hs/fulda/de/ci/exam/project/Address.class index 1cb1d40..4410a35 100644 Binary files a/target/classes/hs/fulda/de/ci/exam/project/Address.class and b/target/classes/hs/fulda/de/ci/exam/project/Address.class differ diff --git a/target/classes/hs/fulda/de/ci/exam/project/Airport.class b/target/classes/hs/fulda/de/ci/exam/project/Airport.class index 9b09b99..e73f556 100644 Binary files a/target/classes/hs/fulda/de/ci/exam/project/Airport.class and b/target/classes/hs/fulda/de/ci/exam/project/Airport.class differ diff --git a/target/test-classes/hs/fulda/de/ci/exam/project/AddressTest.class b/target/test-classes/hs/fulda/de/ci/exam/project/AddressTest.class index b1cf551..a6d458a 100644 Binary files a/target/test-classes/hs/fulda/de/ci/exam/project/AddressTest.class and b/target/test-classes/hs/fulda/de/ci/exam/project/AddressTest.class differ diff --git a/target/test-classes/hs/fulda/de/ci/exam/project/AirportTest.class b/target/test-classes/hs/fulda/de/ci/exam/project/AirportTest.class index 0451f1e..2038134 100644 Binary files a/target/test-classes/hs/fulda/de/ci/exam/project/AirportTest.class and b/target/test-classes/hs/fulda/de/ci/exam/project/AirportTest.class differ