|
@ -1,21 +1,32 @@ |
|
|
package hs.fulda.de.ci.exam.project; |
|
|
package hs.fulda.de.ci.exam.project; |
|
|
|
|
|
|
|
|
import org.junit.jupiter.api.BeforeEach; |
|
|
|
|
|
import org.junit.jupiter.api.DisplayName; |
|
|
|
|
|
import org.junit.jupiter.api.Test; |
|
|
|
|
|
|
|
|
import org.junit.Before; |
|
|
|
|
|
import org.junit.jupiter.api.*; |
|
|
import org.mockito.InjectMocks; |
|
|
import org.mockito.InjectMocks; |
|
|
|
|
|
|
|
|
import java.util.Date; |
|
|
import java.util.Date; |
|
|
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.*; |
|
|
import static org.junit.jupiter.api.Assertions.*; |
|
|
|
|
|
|
|
|
|
|
|
@TestInstance(TestInstance.Lifecycle.PER_CLASS) |
|
|
public class FrontDeskOfficerTest { |
|
|
public class FrontDeskOfficerTest { |
|
|
|
|
|
|
|
|
final Address address1 = new Address("Fuldaer str", "Fulda", "Hessen", "36037", "Germany"); |
|
|
|
|
|
final Airport airport_fr = new Airport("Fraport", address1, "1234"); |
|
|
|
|
|
final Airport airport_be = new Airport("Berlin", address1, "5678"); |
|
|
|
|
|
final FrontDeskOfficer frontDeskOfficer = new FrontDeskOfficer("John", address1, "example@email.com", "0151238967"); |
|
|
|
|
|
|
|
|
Address address1; |
|
|
|
|
|
Airport airport_fr; |
|
|
|
|
|
Airport airport_be; |
|
|
|
|
|
FrontDeskOfficer frontDeskOfficer; |
|
|
|
|
|
|
|
|
|
|
|
@BeforeAll |
|
|
|
|
|
public void setupAll(){ |
|
|
|
|
|
System.out.println("Should Print Before All Tests"); |
|
|
|
|
|
} |
|
|
|
|
|
@BeforeEach |
|
|
|
|
|
public void setup(){ |
|
|
|
|
|
address1 = new Address("Fuldaer str", "Fulda", "Hessen", "36037", "Germany"); |
|
|
|
|
|
airport_fr = new Airport("Fraport", address1, "1234"); |
|
|
|
|
|
airport_be = new Airport("Berlin", address1, "5678"); |
|
|
|
|
|
frontDeskOfficer = new FrontDeskOfficer("John", address1, "example@email.com", "0151238967"); |
|
|
|
|
|
} |
|
|
@Test |
|
|
@Test |
|
|
public void shouldCreateItinerary() { |
|
|
public void shouldCreateItinerary() { |
|
|
frontDeskOfficer.createItinerary(airport_fr, airport_be, new Date()); |
|
|
frontDeskOfficer.createItinerary(airport_fr, airport_be, new Date()); |
|
|