Browse Source

Merge remote-tracking branch 'origin/dev'

# Conflicts:
#	.idea/.gitignore
#	target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
#	target/surefire-reports/TEST-TestExample.xml
#	target/surefire-reports/TEST-hs.fulda.de.ci.exam.project.ExampleClassTest.xml
#	target/surefire-reports/hs.fulda.de.ci.exam.project.ExampleClassTest.txt
main
Imron 2 years ago
parent
commit
10a0a85390
  1. BIN
      .DS_Store
  2. 5
      .idea/.gitignore
  3. 6
      pom.xml
  4. 107
      src/main/java/hs/fulda/de/ci/exam/project/Account.java
  5. 39
      src/main/java/hs/fulda/de/ci/exam/project/AccountRepository.java
  6. 46
      src/main/java/hs/fulda/de/ci/exam/project/AccountService.java
  7. 22
      src/main/java/hs/fulda/de/ci/exam/project/Address.java
  8. 48
      src/main/java/hs/fulda/de/ci/exam/project/Admin.java
  9. 41
      src/main/java/hs/fulda/de/ci/exam/project/Aircraft.java
  10. 31
      src/main/java/hs/fulda/de/ci/exam/project/AircraftRepository.java
  11. 39
      src/main/java/hs/fulda/de/ci/exam/project/Airline.java
  12. 42
      src/main/java/hs/fulda/de/ci/exam/project/Airport.java
  13. 36
      src/main/java/hs/fulda/de/ci/exam/project/BankTransaction.java
  14. 12
      src/main/java/hs/fulda/de/ci/exam/project/CashTransaction.java
  15. 24
      src/main/java/hs/fulda/de/ci/exam/project/CreditCardTransaction.java
  16. 24
      src/main/java/hs/fulda/de/ci/exam/project/Customer.java
  17. 36
      src/main/java/hs/fulda/de/ci/exam/project/EmailNotification.java
  18. 7
      src/main/java/hs/fulda/de/ci/exam/project/ExampleClass.java
  19. 84
      src/main/java/hs/fulda/de/ci/exam/project/Flight.java
  20. 43
      src/main/java/hs/fulda/de/ci/exam/project/FlightInstance.java
  21. 52
      src/main/java/hs/fulda/de/ci/exam/project/FlightRepository.java
  22. 84
      src/main/java/hs/fulda/de/ci/exam/project/FlightReservation.java
  23. 36
      src/main/java/hs/fulda/de/ci/exam/project/FlightReservationRepository.java
  24. 20
      src/main/java/hs/fulda/de/ci/exam/project/FlightSeat.java
  25. 5
      src/main/java/hs/fulda/de/ci/exam/project/FlightStatus.java
  26. 42
      src/main/java/hs/fulda/de/ci/exam/project/FrontDeskOfficer.java
  27. 96
      src/main/java/hs/fulda/de/ci/exam/project/Itinerary.java
  28. 8
      src/main/java/hs/fulda/de/ci/exam/project/ItineraryRepository.java
  29. 5
      src/main/java/hs/fulda/de/ci/exam/project/Notification.java
  30. 40
      src/main/java/hs/fulda/de/ci/exam/project/Passenger.java
  31. 39
      src/main/java/hs/fulda/de/ci/exam/project/Payment.java
  32. 5
      src/main/java/hs/fulda/de/ci/exam/project/PaymentStatus.java
  33. 93
      src/main/java/hs/fulda/de/ci/exam/project/Person.java
  34. 5
      src/main/java/hs/fulda/de/ci/exam/project/ReservationStatus.java
  35. 40
      src/main/java/hs/fulda/de/ci/exam/project/Seat.java
  36. 5
      src/main/java/hs/fulda/de/ci/exam/project/SeatClass.java
  37. 5
      src/main/java/hs/fulda/de/ci/exam/project/SeatType.java
  38. 37
      src/main/java/hs/fulda/de/ci/exam/project/SmsNotification.java
  39. BIN
      src/main/resources/img.png
  40. 140
      src/test/java/hs/fulda/de/ci/exam/project/AccountServiceTest.java
  41. 108
      src/test/java/hs/fulda/de/ci/exam/project/AccountTest.java
  42. 13
      src/test/java/hs/fulda/de/ci/exam/project/AddressTest.java
  43. 151
      src/test/java/hs/fulda/de/ci/exam/project/AdminTest.java
  44. 59
      src/test/java/hs/fulda/de/ci/exam/project/AircraftTest.java
  45. 51
      src/test/java/hs/fulda/de/ci/exam/project/AirlineTest.java
  46. 56
      src/test/java/hs/fulda/de/ci/exam/project/AirportTest.java
  47. 66
      src/test/java/hs/fulda/de/ci/exam/project/CustomerTest.java
  48. 11
      src/test/java/hs/fulda/de/ci/exam/project/ExampleClassTest.java
  49. 84
      src/test/java/hs/fulda/de/ci/exam/project/FlightTest.java
  50. 53
      src/test/java/hs/fulda/de/ci/exam/project/FrontDeskOfficerTest.java
  51. 112
      src/test/java/hs/fulda/de/ci/exam/project/ItineraryTest.java
  52. 60
      src/test/java/hs/fulda/de/ci/exam/project/NotificationTest.java
  53. 57
      src/test/java/hs/fulda/de/ci/exam/project/PaymentTest.java
  54. 70
      src/test/java/hs/fulda/de/ci/exam/project/PersonTest.java
  55. 29
      src/test/java/hs/fulda/de/ci/exam/project/SeatTest.java
  56. BIN
      target/AirlineManagementSystem-1.0-SNAPSHOT.jar
  57. BIN
      target/classes/hs/fulda/de/ci/exam/project/Address.class
  58. BIN
      target/classes/hs/fulda/de/ci/exam/project/Aircraft.class
  59. BIN
      target/classes/hs/fulda/de/ci/exam/project/Airline.class
  60. BIN
      target/classes/hs/fulda/de/ci/exam/project/Airport.class
  61. BIN
      target/classes/hs/fulda/de/ci/exam/project/Customer.class
  62. BIN
      target/classes/hs/fulda/de/ci/exam/project/ExampleClass.class
  63. BIN
      target/classes/hs/fulda/de/ci/exam/project/Flight.class
  64. BIN
      target/classes/hs/fulda/de/ci/exam/project/FlightInstance.class
  65. BIN
      target/classes/hs/fulda/de/ci/exam/project/Itinerary.class
  66. BIN
      target/classes/hs/fulda/de/ci/exam/project/ItineraryRepository.class
  67. BIN
      target/classes/hs/fulda/de/ci/exam/project/Person.class
  68. BIN
      target/classes/img.png
  69. 2
      target/maven-archiver/pom.properties
  70. 5
      target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  71. 5
      target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  72. 4
      target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
  73. 4
      target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst
  74. 62
      target/surefire-reports/TEST-TestExample.xml
  75. 62
      target/surefire-reports/TEST-hs.fulda.de.ci.exam.project.AddressTest.xml
  76. 65
      target/surefire-reports/TEST-hs.fulda.de.ci.exam.project.AirlineTest.xml
  77. 66
      target/surefire-reports/TEST-hs.fulda.de.ci.exam.project.AirportTest.xml
  78. 62
      target/surefire-reports/TEST-hs.fulda.de.ci.exam.project.ExampleClassTest.xml
  79. 69
      target/surefire-reports/TEST-hs.fulda.de.ci.exam.project.FlightTest.xml
  80. 65
      target/surefire-reports/TEST-hs.fulda.de.ci.exam.project.PersonTest.xml
  81. 62
      target/surefire-reports/TEST-hs.fulda.de.ci.exam.project.TestExampleClass.xml
  82. 4
      target/surefire-reports/hs.fulda.de.ci.exam.project.AddressTest.txt
  83. 4
      target/surefire-reports/hs.fulda.de.ci.exam.project.AirlineTest.txt
  84. 4
      target/surefire-reports/hs.fulda.de.ci.exam.project.AirportTest.txt
  85. 4
      target/surefire-reports/hs.fulda.de.ci.exam.project.ExampleClassTest.txt
  86. 4
      target/surefire-reports/hs.fulda.de.ci.exam.project.FlightTest.txt
  87. 4
      target/surefire-reports/hs.fulda.de.ci.exam.project.PersonTest.txt
  88. 4
      target/surefire-reports/hs.fulda.de.ci.exam.project.TestExampleClass.txt
  89. BIN
      target/test-classes/TestExample.class
  90. BIN
      target/test-classes/hs/fulda/de/ci/exam/project/AddressTest.class
  91. BIN
      target/test-classes/hs/fulda/de/ci/exam/project/AircraftTest.class
  92. BIN
      target/test-classes/hs/fulda/de/ci/exam/project/AirlineTest.class
  93. BIN
      target/test-classes/hs/fulda/de/ci/exam/project/AirportTest.class
  94. BIN
      target/test-classes/hs/fulda/de/ci/exam/project/CustomerTest.class
  95. BIN
      target/test-classes/hs/fulda/de/ci/exam/project/ExampleClassTest.class
  96. BIN
      target/test-classes/hs/fulda/de/ci/exam/project/FlightTest.class
  97. BIN
      target/test-classes/hs/fulda/de/ci/exam/project/PersonTest.class

BIN
.DS_Store

5
.idea/.gitignore

@ -6,7 +6,9 @@
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
/target
target/
target
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
@ -15,10 +17,11 @@ release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
# Eclipse m2e generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath
.classpath

6
pom.xml

@ -50,6 +50,12 @@
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>

107
src/main/java/hs/fulda/de/ci/exam/project/Account.java

@ -0,0 +1,107 @@
package hs.fulda.de.ci.exam.project;
public class Account {
private AccountRepository accountRepository;
public Account(String id, String password, AccountStatus status) {
this.id = id;
this.password = password;
this.status = status;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public AccountStatus getStatus() {
return status;
}
public void setStatus(AccountStatus status) {
this.status = status;
}
public boolean isEnabled() {
if(status == AccountStatus.ACTIVE) return true;
return false;
}
public String getPasswordHash() {
return new PasswordEncoder().encode(password);
}
public enum AccountStatus {
ACTIVE,
CLOSED,
CANCELED,
BLACKLISTED,
BLOCKED
}
private String id;
private String password;
private AccountStatus status;
public boolean resetPassword(String new_password){
if(status == AccountStatus.ACTIVE){
this.password = new_password;
}
return false;
}
public void validatePersonDetails(Person person){
person.validateName();
person.validateAddress();
person.validateEmailAddress();
person.validatePhoneNumber();
}
public void addAccountDetails(String id, String name, Address address, String email, String phone){
Person person = new Person(name, address, email, phone);
validatePersonDetails(person);
accountRepository.addPersonalDetails(person, id);
}
public void validateId() {
if(this.id.isBlank())
throw new RuntimeException(("Id Cannot be null or empty"));
}
public void validatePassword(){
if(this.password.isBlank())
throw new RuntimeException(("Id Cannot be null or empty"));
}
public void validateAccountStatus(){
if(this.status.equals(null))
throw new RuntimeException(("Id Cannot be null or empty"));
}
}
class PasswordEncoder{
String encode(String password){
int p = 31;
int m = (int) Math.pow(10, 9) + 9;
int hash_value = 0;
int p_pow = 1;
for (char c : password.toCharArray()) {
hash_value = (hash_value + (c - 'a' + 1) * p_pow) % m;
p_pow = (p_pow * p) % m;
}
return Integer.toString(hash_value);
}
}

39
src/main/java/hs/fulda/de/ci/exam/project/AccountRepository.java

@ -0,0 +1,39 @@
package hs.fulda.de.ci.exam.project;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class AccountRepository {
Map<String, Account> accountList = new ConcurrentHashMap<String, Account>();
Map<Account, Person> personalInfo = new ConcurrentHashMap<>();
public boolean checkIfAccountAlreadyExist(Account account){
if(accountList.containsKey(generateKey(account))){
return true;
}
return false;
}
Account findById(String id){
Account account = accountList.get(id);
return account;
}
private String generateKey(Account account) {
return String.format("%s", account.getId());
}
public Collection<Account> findAll() {
return accountList.values();
}
public boolean save(Account account){
accountList.put(generateKey(account), account);
return true;
}
public void addPersonalDetails(Person person, String id){
personalInfo.put(accountList.get(id), person);
}
public void delete(Account account) {
accountList.remove(generateKey(account));
}
}

46
src/main/java/hs/fulda/de/ci/exam/project/AccountService.java

@ -0,0 +1,46 @@
package hs.fulda.de.ci.exam.project;
import java.util.Date;
public class AccountService {
private final AccountRepository accountRepository;
private final PasswordEncoder passwordEncoder;
public AccountService(AccountRepository accountRepository, PasswordEncoder passwordEncoder) {
this.accountRepository = accountRepository;
this.passwordEncoder = passwordEncoder;
}
public boolean isValidAccount(String id, String password){
Account account = accountRepository.findById(id);
return isEnabledAccount(account) && isValidPassword(account, password);
}
private boolean isEnabledAccount(Account account) {
return account!= null && account.isEnabled();
}
private boolean isValidPassword(Account account, String password) {
String encodedPassword = passwordEncoder.encode(password);
return encodedPassword.equals(account.getPasswordHash());
}
public void validateAccount(Account account){
account.validateAccountStatus();
account.validateId();
account.validatePassword();
}
public void checkIfAccountAlreadyExist(Account account){
if(accountRepository.checkIfAccountAlreadyExist(account)){
throw new RuntimeException("Account Already Exists");
}
}
public boolean createAccount(String id, String password, Account.AccountStatus accountStatus){
Account account = new Account(id, password, accountStatus);
validateAccount(account);
checkIfAccountAlreadyExist(account);
accountRepository.save(account);
return true;
}
}

22
src/main/java/hs/fulda/de/ci/exam/project/Address.java

@ -0,0 +1,22 @@
package hs.fulda.de.ci.exam.project;
public class Address {
String streetAddress;
String city;
String state;
String zipCode;
String country;
public Address(String streetAddress, String city, String state, String zipCode, String country) {
this.streetAddress = streetAddress;
this.city = city;
this.state = state;
this.zipCode = zipCode;
this.country = country;
}
@Override
public String toString() {
return streetAddress + ", " + city + ", " + state + ", " + zipCode + ", " + country;
}
}

48
src/main/java/hs/fulda/de/ci/exam/project/Admin.java

@ -0,0 +1,48 @@
package hs.fulda.de.ci.exam.project;
import java.io.IOException;
public class Admin extends Person{
AccountRepository accountRepository;
FlightRepository flightRepository;
AircraftRepository aircraftRepository;
public Admin(String name, Address address, String email, String phone) {
super(name, address, email, phone);
}
public Aircraft addAircraft(String name, String model, int manufacturerYear) throws IOException {
if(name.isBlank()) throw new RuntimeException("Name cannot be null or empty");
if(model.isBlank()) throw new RuntimeException("Model cannot be null or empty");
if(manufacturerYear < 0) throw new RuntimeException("Year cannot be zero");
Aircraft aircraft = new Aircraft(name, model, manufacturerYear);
aircraftRepository.save(aircraft);
return aircraft;
}
public String searchAircraft(String name){
String aircraftDetails = aircraftRepository.findAircraftByAircraftName(name);
if(aircraftDetails.isBlank()){
throw new RuntimeException("Aircraft does not exist.");
}
return aircraftDetails;
}
public Flight addFlight(String flightNumber, Airport departure, Airport arrival, int durationInMinutes ) throws IOException {
if(flightNumber.isBlank()) throw new RuntimeException("FlightNumber cannot be null or empty");
if(departure.equals(null)) throw new RuntimeException("Departure cannot be null or empty");
if(arrival.equals(null)) throw new RuntimeException("Arrival cannot be null or empty");
if(durationInMinutes < 0) throw new RuntimeException("Duration cannot be negative");
Flight flight = new Flight(flightNumber, departure, arrival, durationInMinutes );
flightRepository.save(flight);
return flight;
}
public boolean blockUser(Account user){
if(accountRepository.checkIfAccountAlreadyExist(user)){
user.setStatus(Account.AccountStatus.BLOCKED);
return true;
}
return false;
}
}

41
src/main/java/hs/fulda/de/ci/exam/project/Aircraft.java

@ -0,0 +1,41 @@
package hs.fulda.de.ci.exam.project;
import java.util.HashSet;
public class Aircraft {
private String name;
private String model;
private int manYear;
private HashSet<Flight> flights = new HashSet<Flight>();
public Aircraft(String name, String model, int manufacturingYear) {
this.name = name;
this.model = model;
this.manYear = manufacturingYear;
}
public String getName() {
return this.name;
}
public String getModel() {
return this.model;
}
public int getManYear() {
return this.manYear;
}
public HashSet<Flight> getFlights() {
return this.flights;
}
public void addFlight(Flight flight) {
flights.add(flight);
}
@Override
public String toString() {
return "Aircraft = {" + "name=" + name + '\'' + ", model=" + model + ", manufacturingYear='" + manYear +'}';
}
}

31
src/main/java/hs/fulda/de/ci/exam/project/AircraftRepository.java

@ -0,0 +1,31 @@
package hs.fulda.de.ci.exam.project;
import java.io.*;
import java.util.Scanner;
public class AircraftRepository {
boolean save(Aircraft aircraft) throws IOException {
FileWriter fw = new FileWriter("aircraft_list.txt", true);
BufferedWriter bw = new BufferedWriter(fw);
bw.write(aircraft.toString());
bw.newLine();
bw.close();
return true;
};
String findAircraftByAircraftName(String AircraftName){
File file = new File("aircraft_list.txt");
try {
Scanner scanner = new Scanner(file);
while (scanner.hasNextLine()) {
String line = scanner.nextLine();
if(line.matches("(.*)"+AircraftName+"(.*)")) {
return line;
}
}
} catch(FileNotFoundException e) {
System.out.println("There are no aircrafts added yet. Please add a aircraft first");
}
return "";
}
}

39
src/main/java/hs/fulda/de/ci/exam/project/Airline.java

@ -0,0 +1,39 @@
package hs.fulda.de.ci.exam.project;
import java.util.HashSet;
public class Airline {
private String name;
private String code;
private HashSet<Flight> flights;
public Airline(String name, String code) {
this.name = name;
this.code = code;
this.flights = new HashSet<>();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public HashSet<Flight> getFlights() {
return flights;
}
public void addFlight(Flight flight) {
flights.add(flight);
}
}

42
src/main/java/hs/fulda/de/ci/exam/project/Airport.java

@ -0,0 +1,42 @@
package hs.fulda.de.ci.exam.project;
import java.util.HashSet;
public class Airport {
protected String name;
public Address address;
protected String code;
public HashSet<Flight> flights = new HashSet<>();
public Airport(String name, Address address, String code) {
this.name = name;
this.address = address;
this.code = code;
}
public Airport() {
}
public String getName() {
return this.name;
}
public String getCode() {
return this.code;
}
public Address getAddress() {
return this.address;
}
public HashSet<Flight> getFlights() {
return this.flights;
}
@Override
public String toString() {
return "Airport{" + "name='" + name + '\'' + ", address=" + address + ", code='" + code + '\'' + '}';
}
}

36
src/main/java/hs/fulda/de/ci/exam/project/BankTransaction.java

@ -0,0 +1,36 @@
package hs.fulda.de.ci.exam.project;
public class BankTransaction extends Payment {
String bankName;
String iban;
public BankTransaction(int id, String amount, PaymentStatus status, String bankName, String iban) {
super(id, amount, status);
this.bankName = bankName;
this.iban = iban;
}
public String getBankName() {
return bankName;
}
public void setBankName(String bankName) {
this.bankName = bankName;
}
public String getIban() {
return iban;
}
public void setIban(String iban) {
this.iban = iban;
}
@Override
public boolean isValid() {
if (this.iban.length() != 22) {
return false;
}
return true;
}
}

12
src/main/java/hs/fulda/de/ci/exam/project/CashTransaction.java

@ -0,0 +1,12 @@
package hs.fulda.de.ci.exam.project;
public class CashTransaction extends Payment {
public CashTransaction(int id, String amount, PaymentStatus status) {
super(id, amount, status);
}
@Override
public boolean isValid() {
return true;
}
}

24
src/main/java/hs/fulda/de/ci/exam/project/CreditCardTransaction.java

@ -0,0 +1,24 @@
package hs.fulda.de.ci.exam.project;
public class CreditCardTransaction extends Payment {
String cardNumber;
public CreditCardTransaction(int id, String amount, PaymentStatus status, String cardNumber) {
super(id, amount, status);
this.cardNumber = cardNumber;
}
public String getCardNumber() {
return cardNumber;
}
public void setCardNumber(String cardNumber) {
this.cardNumber = cardNumber;
}
@Override
public boolean isValid() {
if (this.cardNumber.length() != 20) return false;
return true;
}
}

24
src/main/java/hs/fulda/de/ci/exam/project/Customer.java

@ -0,0 +1,24 @@
package hs.fulda.de.ci.exam.project;
import java.util.ArrayList;
public class Customer extends Person{
private String frequentFlyerNumber;
public Customer(String name, Address address, String email, String phone) {
super(name, address, email, phone);
}
public void setFrequentFlyerNumber(String frequentFlyerNumber) {
this.frequentFlyerNumber = frequentFlyerNumber;
}
public String getFrequentFlyerNumber() {
return frequentFlyerNumber;
}
}

36
src/main/java/hs/fulda/de/ci/exam/project/EmailNotification.java

@ -0,0 +1,36 @@
package hs.fulda.de.ci.exam.project;
import java.util.regex.Pattern;
public class EmailNotification extends Notification {
String email;
String content;
public EmailNotification(String email, String content) {
super();
this.email = email;
this.content = content;
}
@Override
public boolean sendNotification() {
if (isValidEmail(email)) {
System.out.println("Email is sent to " + email);
return true;
}
System.out.println("Invalid Email Address");
return false;
}
private boolean isValidEmail(String email) {
String regexPattern = "^(?=.{1,64}@)[A-Za-z0-9_-]+(\\.[A-Za-z0-9_-]+)*@"
+ "[^-][A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$";
return patternMatches(email, regexPattern);
}
public static boolean patternMatches(String emailAddress, String regexPattern) {
return Pattern.compile(regexPattern)
.matcher(emailAddress)
.matches();
}
}

7
src/main/java/hs/fulda/de/ci/exam/project/ExampleClass.java

@ -1,7 +0,0 @@
package hs.fulda.de.ci.exam.project;
public class ExampleClass {
public static void main(String[] args) {
System.out.println("Example Class Runs");
}
}

84
src/main/java/hs/fulda/de/ci/exam/project/Flight.java

@ -0,0 +1,84 @@
package hs.fulda.de.ci.exam.project;
import java.util.HashSet;
import static hs.fulda.de.ci.exam.project.FlightStatus.Cancelled;
public class Flight {
String flightNumber;
Airport departure;
Airport arrival;
int durationInMinutes;
HashSet<FlightInstance> flightInstances = new HashSet<>();
public Flight(String flightNumber, Airport departure, Airport arrival, int durationInMinutes) {
this.flightNumber = flightNumber;
this.departure = departure;
this.arrival = arrival;
this.durationInMinutes = durationInMinutes;
}
public Flight() {
}
public HashSet<FlightInstance> getInstances() {
return this.flightInstances;
}
public FlightInstance getFlightInstance(FlightInstance fi) {
for (FlightInstance obj : flightInstances) {
if (obj.equals(fi))
return obj;
}
return null;
}
public boolean cancel(FlightInstance fInstance1) {
if (flightInstances.contains(fInstance1)) {
for (FlightInstance obj : flightInstances) {
if (obj.equals(fInstance1)) {
obj.status = Cancelled;
System.out.println("Flight intance is cancelled");
}
}
return true;
}
return false;
}
public boolean addFlightSchedule(FlightInstance fi) {
flightInstances.add(fi);
if (flightInstances.contains(fi)) {
System.out.println("Flight instance is added");
return true;
}
return false;
}
public String getFlightNumber() {
return flightNumber;
}
public Airport getDeparture() {
return departure;
}
public Airport getArrival() {
return arrival;
}
public int getDurationInMinutes() {
return durationInMinutes;
}
public void setFlightNumber(String flightNumber) {
this.flightNumber = flightNumber;
}
@Override
public String toString() {
return "Flight = {" + "flightNumber=" + flightNumber + '\'' + ", departure=" + departure + ", arrival='" + arrival + ", durationInMinutes=" + durationInMinutes + '}';
}
}

43
src/main/java/hs/fulda/de/ci/exam/project/FlightInstance.java

@ -0,0 +1,43 @@
package hs.fulda.de.ci.exam.project;
import java.sql.Time;
public class FlightInstance {
Time departureTime;
String gate;
FlightStatus status;
public FlightInstance(Time departureTime, String gate, FlightStatus status) {
this.departureTime = departureTime;
this.gate = gate;
this.status = status;
}
public FlightInstance(){
}
public Time getDepartureTime() {
return departureTime;
}
public void setDepartureTime(Time departureTime) {
this.departureTime = departureTime;
}
public String getGate() {
return gate;
}
public void setGate(String gate) {
this.gate = gate;
}
public FlightStatus getStatus() {
return status;
}
public void setStatus(FlightStatus status) {
this.status = status;
}
}

52
src/main/java/hs/fulda/de/ci/exam/project/FlightRepository.java

@ -0,0 +1,52 @@
package hs.fulda.de.ci.exam.project;
import java.io.*;
import java.util.ArrayList;
import java.util.Scanner;
public class FlightRepository {
boolean save(Flight flight) throws IOException {
FileWriter fw = new FileWriter("flights.txt", true);
BufferedWriter bw = new BufferedWriter(fw);
bw.write(flight.toString());
bw.newLine();
bw.close();
return true;
};
String findFlightByFlightNumber(String flightNumber){
File file = new File("flights.txt");
try {
Scanner scanner = new Scanner(file);
while (scanner.hasNextLine()) {
String line = scanner.nextLine();
if(line.matches("(.*)"+flightNumber+"(.*)")) {
return line;
}
}
} catch(FileNotFoundException e) {
System.out.println("There are no flights added yet. Please add a flight");
}
return "";
}
public ArrayList<String> findbyDepartureArrival(Airport departure, Airport arrival) {
ArrayList<String> flights = new ArrayList<>();
File file = new File("flights.txt");
try {
Scanner scanner = new Scanner(file);
while (scanner.hasNextLine()) {
String line = scanner.nextLine();
if(line.matches("(.*)"+departure+"(.*)") && line.matches("(.*)"+arrival+"(.*)")) {
flights.add(line);
}
}
} catch(FileNotFoundException e) {
System.out.println("There are no flights added yet. Please add a flight");
}
return flights;
}
}

84
src/main/java/hs/fulda/de/ci/exam/project/FlightReservation.java

@ -0,0 +1,84 @@
package hs.fulda.de.ci.exam.project;
import java.util.HashMap;
import static hs.fulda.de.ci.exam.project.PaymentStatus.Completed;
import static hs.fulda.de.ci.exam.project.PaymentStatus.Failed;
import static hs.fulda.de.ci.exam.project.ReservationStatus.Cancelled;
import static hs.fulda.de.ci.exam.project.ReservationStatus.Confirmed;
public class FlightReservation {
String reservationNumber;
FlightInstance flight;
HashMap<Passenger, FlightSeat> seatMap;
ReservationStatus status;
public FlightReservation(String reservationNumber, FlightInstance flight, HashMap<Passenger, FlightSeat> seatMap, ReservationStatus status) {
this.reservationNumber = reservationNumber;
this.flight = flight;
this.seatMap = seatMap;
this.status = status;
}
public FlightReservation(){
}
public String getReservationNumber() {
return reservationNumber;
}
public void setReservationNumber(String reservationNumber) {
this.reservationNumber = reservationNumber;
}
public FlightInstance getFlight() {
return flight;
}
public void setFlight(FlightInstance flight) {
this.flight = flight;
}
public HashMap<Passenger, FlightSeat> getSeatMap() {
return seatMap;
}
public void setSeatMap(HashMap<Passenger, FlightSeat> seatMap) {
this.seatMap = seatMap;
}
public ReservationStatus getStatus() {
return status;
}
public void setStatus(ReservationStatus status) {
this.status = status;
}
public void makePayment(Payment payment) {
System.out.println("processing payment");
if (payment.isValid()) {
payment.status = Completed;
setStatus(Confirmed);
} else {
payment.status = Failed;
setStatus(Cancelled);
}
}
public boolean notifyUser(String type, String to, String content) {
Notification notification = null;
switch (type) {
case "email":
notification = new EmailNotification(to, content);
break;
case "sms":
notification = new SmsNotification(to, content);
break;
}
return notification.sendNotification();
}
}

36
src/main/java/hs/fulda/de/ci/exam/project/FlightReservationRepository.java

@ -0,0 +1,36 @@
package hs.fulda.de.ci.exam.project;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class FlightReservationRepository {
Map<String, FlightReservation> flightReservationList = new ConcurrentHashMap<String, FlightReservation>();
public boolean checkIfFlightAlreadyExist(FlightReservation flightReservation){
if(flightReservationList.containsKey(generateKey(flightReservation))){
return true;
}
return false;
}
FlightReservation findById(String id){
FlightReservation flightReservation = flightReservationList.get(id);
return flightReservation;
}
private String generateKey(FlightReservation flightReservation) {
return String.format("%s", flightReservation.getReservationNumber());
}
public Collection<FlightReservation> findAll() {
return flightReservationList.values();
}
public boolean save(FlightReservation flightReservation){
flightReservationList.put(generateKey(flightReservation), flightReservation);
return true;
}
public void delete(FlightReservation flightReservation) {
flightReservationList.remove(generateKey(flightReservation));
}
}

20
src/main/java/hs/fulda/de/ci/exam/project/FlightSeat.java

@ -0,0 +1,20 @@
package hs.fulda.de.ci.exam.project;
public class FlightSeat extends Seat {
private String reservationNumer;
private double fare;
public FlightSeat(double fare, String reservationNumer) {
super();
this.fare = fare;
this.reservationNumer = reservationNumer;
}
public double getFare() {
return this.fare;
}
public String getReservationNumber() {
return this.reservationNumer;
}
}

5
src/main/java/hs/fulda/de/ci/exam/project/FlightStatus.java

@ -0,0 +1,5 @@
package hs.fulda.de.ci.exam.project;
public enum FlightStatus {
Active, Scheduled, Delayed, Departed, Landed, InAir, Arrived, Cancelled, Diverted, Unknown
}

42
src/main/java/hs/fulda/de/ci/exam/project/FrontDeskOfficer.java

@ -0,0 +1,42 @@
package hs.fulda.de.ci.exam.project;
import java.util.Collection;
import java.util.Date;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class FrontDeskOfficer extends Person{
Map<String, Itinerary> itineraryList = new ConcurrentHashMap<String, Itinerary>();
public FrontDeskOfficer(String name, Address address, String email, String phone) {
super(name, address, email, phone);
}
public void createItinerary(Airport start_airport, Airport final_airport, Date date){
Itinerary itinerary = new Itinerary(start_airport, final_airport, date);
validateItinerary(itinerary);
checkIfItineraryAlreadyExist(itinerary);
itineraryList.put(generateKey(itinerary), itinerary);
}
public Collection<Itinerary> getAllItineraries() {
return itineraryList.values();
}
private void checkIfItineraryAlreadyExist(Itinerary itinerary){
if(itineraryList.containsKey(generateKey(itinerary))){
throw new RuntimeException("Itinerary Already Exists");
}
}
private String generateKey(Itinerary itinerary) {
return String.format("%s-%s", itinerary.getStart_airport(), itinerary.getFinal_airport());
}
public void validateItinerary(Itinerary itinerary){
itinerary.validateStartAirport();
itinerary.validateFinalAirport();
itinerary.validateCreationDate();
}
}

96
src/main/java/hs/fulda/de/ci/exam/project/Itinerary.java

@ -0,0 +1,96 @@
package hs.fulda.de.ci.exam.project;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
public class Itinerary {
private Airport start_airport;
private Airport final_airport;
private Date creationDate;
private FlightReservationRepository flightReservationRepository;
public Itinerary(Airport start_airport, Airport final_airport, Date creationDate) {
this.start_airport = start_airport;
this.final_airport = final_airport;
this.creationDate = creationDate;
}
public float makeDiscount(float fare, float discountRate){
fare = fare - (fare * discountRate/100);
return fare;
}
public boolean makePayment(FlightReservation flightReservation, String transactionType, Customer customer, float fare){
if(customer.getItineraries().size() >= 2) {
fare = makeDiscount(fare, 10);
if (transactionType == "Credit") {
fare = makeDiscount(fare, 15);
System.out.println("Your discount rate is 15%. The total amount of: " + fare + "Euro");
return true;
} else if (transactionType == "Cash" || transactionType == "Check") {
System.out.println("Your discount rate is 10%. The total amount of: " + fare + "Euro");
return true;
}
}
flightReservation.setStatus(ReservationStatus.Pending);
return false;
}
public FlightReservation makeReservation(FlightSeat flightSeat, Passenger passenger){
HashMap<Passenger, FlightSeat> seatHashMap= new HashMap<Passenger, FlightSeat>();
seatHashMap.put(passenger, flightSeat);
validatePassengerDetails(passenger);
FlightReservation flight = new FlightReservation();
flight.setSeatMap(seatHashMap);
flight.setStatus(ReservationStatus.Requested);
return flight;
}
public Airport getFinal_airport() {
return final_airport;
}
public Airport getStart_airport() {
return start_airport;
}
public Date getCreationDate() {
return creationDate;
}
public void setCreationDate(Date creationDate) {
this.creationDate = creationDate;
}
public void setFinal_airport(Airport final_airport) {
this.final_airport = final_airport;
}
public void setStart_airport(Airport start_airport) {
this.start_airport = start_airport;
}
public void validateStartAirport() {
if(this.start_airport.getName().isBlank())
throw new RuntimeException(("Starting Airport Cannot be null or empty"));
}
public void validateFinalAirport() {
if(this.final_airport.getName().isBlank())
throw new RuntimeException(("Destination Airport Cannot be null or empty"));
}
public void validateCreationDate() {
if(this.creationDate.equals(null))
throw new RuntimeException(("Creation Date should not be null or empty"));
}
public void validatePassengerDetails(Passenger passenger){
passenger.validateName();
passenger.validatePassportNumber();
passenger.validateDate();
}
}

8
src/main/java/hs/fulda/de/ci/exam/project/ItineraryRepository.java

@ -0,0 +1,8 @@
package hs.fulda.de.ci.exam.project;
import java.util.ArrayList;
public interface ItineraryRepository {
ArrayList<Itinerary> findAll();
void save(Itinerary itinerary);
}

5
src/main/java/hs/fulda/de/ci/exam/project/Notification.java

@ -0,0 +1,5 @@
package hs.fulda.de.ci.exam.project;
public abstract class Notification {
public abstract boolean sendNotification();
}

40
src/main/java/hs/fulda/de/ci/exam/project/Passenger.java

@ -0,0 +1,40 @@
package hs.fulda.de.ci.exam.project;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Passenger {
private String name;
private String passportNumber;
private Date dateOfBirth;
public Passenger(String name, String passportNumber, Date dateOfBirth) {
this.name = name;
this.passportNumber = passportNumber;
this.dateOfBirth = dateOfBirth;
}
public void validateName() {
if(name.isBlank()) {
throw new RuntimeException(("Name cannot be null or empty"));
}
}
public void validatePassportNumber() {
Pattern pattern = Pattern.compile("^(?!^0+$)[a-zA-Z0-9]{3,20}$");
Matcher matcher = pattern.matcher(this.passportNumber);
if(passportNumber.isBlank()){
throw new RuntimeException("Passport number cannot be blank");
}
if(!matcher.matches()){
throw new RuntimeException("Passport number cannot be null or empty");
}
}
public void validateDate() {
if(dateOfBirth.equals(null)) {
throw new RuntimeException("Birthdate cannot be null");
}
}
}

39
src/main/java/hs/fulda/de/ci/exam/project/Payment.java

@ -0,0 +1,39 @@
package hs.fulda.de.ci.exam.project;
public abstract class Payment {
int id;
String amount;
PaymentStatus status;
public Payment(int id, String amount, PaymentStatus status) {
this.id = id;
this.amount = amount;
this.status = status;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getAmount() {
return amount;
}
public void setAmount(String amount) {
this.amount = amount;
}
public PaymentStatus isStatus() {
return status;
}
public void setStatus(PaymentStatus status) {
this.status = status;
}
public abstract boolean isValid();
}

5
src/main/java/hs/fulda/de/ci/exam/project/PaymentStatus.java

@ -0,0 +1,5 @@
package hs.fulda.de.ci.exam.project;
public enum PaymentStatus {
Unpaid, Pending, Completed, Failed, Declined, Cancelled, Abandoned, Settling, Settled, Refunded
}

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

@ -0,0 +1,93 @@
package hs.fulda.de.ci.exam.project;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Person {
private String name;
private Address address;
private String email;
private String phone;
private FlightRepository flightRepository;
private ItineraryRepository itineraryRepository;
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;
}
public void validateName() {
if(this.name.isBlank())
throw new RuntimeException(("Name Cannot be null or empty"));
}
public void validateAddress(){
if(this.address.equals(null))
throw new RuntimeException(("Address Cannot be null"));
}
public void validateEmailAddress(){
Pattern pattern = Pattern.compile("^(.+)@(.+)$");
Matcher matcher = pattern.matcher(this.email);
if(email.isBlank()){
throw new RuntimeException("Email cannot be blank");
}
if(!matcher.matches()){
throw new RuntimeException("Email address is not Valid");
}
}
public void validatePhoneNumber(){
if(this.phone.isBlank()) {
throw new RuntimeException("Phone Number Cannot be null or empty");
}
if(this.phone.length()>13) {
throw new RuntimeException("Phone Number is too long");
}
if(this.phone.length()<9) {
throw new RuntimeException("Phone Number is too short");
}
if(this.phone.matches("\\d")) {
throw new RuntimeException("Phone Number Contain only digits");
}
if(!this.phone.startsWith("0")) {
throw new RuntimeException("Phone Number should start with 0");
}
}
public String searchFlights(String flightNumber){
String flightDetails = flightRepository.findFlightByFlightNumber(flightNumber);
if(flightDetails.isBlank()){
throw new RuntimeException("Flight does not exist.");
}
return flightDetails;
}
public ArrayList<String> searchAllFlightsByCriteria(Airport departure, Airport arrival){
ArrayList<String> flights = flightRepository.findbyDepartureArrival(departure, arrival);
if(flights.isEmpty()){
throw new RuntimeException("Flights do not exist.");
}
return flights;
}
public ArrayList<Itinerary> getItineraries() {
return itineraryRepository.findAll();
}
}

5
src/main/java/hs/fulda/de/ci/exam/project/ReservationStatus.java

@ -0,0 +1,5 @@
package hs.fulda.de.ci.exam.project;
public enum ReservationStatus {
Requested, Pending, Confirmed, CheckedIn, Cancelled, Abandoned
}

40
src/main/java/hs/fulda/de/ci/exam/project/Seat.java

@ -0,0 +1,40 @@
package hs.fulda.de.ci.exam.project;
public class Seat {
private SeatClass seatClass;
private SeatType seatType;
private String seatNumber;
public Seat(String seatNumber, SeatType seatType, SeatClass seatClass) {
this.seatNumber = seatNumber;
this.seatType = seatType;
this.seatClass = seatClass;
}
public Seat(){
}
public SeatClass getSeatClass() {
return seatClass;
}
public void setSeatClass(SeatClass seatClass) {
this.seatClass = seatClass;
}
public SeatType getSeatType() {
return seatType;
}
public void setSeatType(SeatType seatType) {
this.seatType = seatType;
}
public String getSeatNumber() {
return seatNumber;
}
public void setSeatNumber(String seatNumber) {
this.seatNumber = seatNumber;
}
}

5
src/main/java/hs/fulda/de/ci/exam/project/SeatClass.java

@ -0,0 +1,5 @@
package hs.fulda.de.ci.exam.project;
public enum SeatClass {
Economy, EconomyPlus, PreferredEconomy, Business, FirstClass
}

5
src/main/java/hs/fulda/de/ci/exam/project/SeatType.java

@ -0,0 +1,5 @@
package hs.fulda.de.ci.exam.project;
public enum SeatType {
Regular, Accessible, EmergencyExit, ExtraLegRoom
}

37
src/main/java/hs/fulda/de/ci/exam/project/SmsNotification.java

@ -0,0 +1,37 @@
package hs.fulda.de.ci.exam.project;
import java.util.regex.Pattern;
public class SmsNotification extends Notification {
String to;
String content;
public SmsNotification(String to, String content) {
super();
this.to = to;
this.content = content;
}
@Override
public boolean sendNotification() {
if (isValidEmail(to)) {
System.out.println("SMS is sent to " + to);
return true;
}
System.out.println("Invalid Number");
return false;
}
private boolean isValidEmail(String to) {
String regexPattern = "(\\(?([\\d \\-\\)\\–\\+\\/\\(]+){6,}\\)?([ .\\-–\\/]?)([\\d]+))";
return patternMatches(to, regexPattern);
}
public static boolean patternMatches(String emailAddress, String regexPattern) {
return Pattern.compile(regexPattern)
.matcher(emailAddress)
.matches();
}
}

BIN
src/main/resources/img.png

After

Width: 750  |  Height: 813  |  Size: 259 KiB

140
src/test/java/hs/fulda/de/ci/exam/project/AccountServiceTest.java

@ -0,0 +1,140 @@
package hs.fulda.de.ci.exam.project;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.DisplayName;
import org.mockito.ArgumentCaptor;
import org.mockito.InOrder;
import java.util.ArrayList;
import java.util.Date;
import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.*;
public class AccountServiceTest {
private static final String PASSWORD = "password";
private static final Account ENABLED_USER =
new Account("user id", "hash", Account.AccountStatus.ACTIVE);
private static final Account DISABLED_USER =
new Account("disabled user id", "disabled user password hash", Account.AccountStatus.CLOSED);
private AccountRepository accountRepository;
private PasswordEncoder passwordEncoder;
private AccountService accountService;
@Before
public void setup() {
accountRepository = createAccountRepository();
passwordEncoder = createPasswordEncoder();
accountService = new AccountService(accountRepository, passwordEncoder);
}
@Test
public void shouldBeValidForValidCredentials(){
boolean accountIsValid = accountService.isValidAccount(ENABLED_USER.getId(), PASSWORD);
assertTrue(accountIsValid);
verify(accountRepository).findById(ENABLED_USER.getId());
verify(passwordEncoder).encode(PASSWORD);
}
@Test
public void shouldBEInvalidForInvalidId() {
boolean accountIsValid = accountService.isValidAccount("invalid id", PASSWORD);
assertFalse(accountIsValid);
InOrder inOrder = inOrder(accountRepository, passwordEncoder);
inOrder.verify(accountRepository).findById("invalid id");
inOrder.verify(passwordEncoder, never()).encode(anyString());
}
@Test
public void shouldBeInvalidForInvalid(){
boolean accountIsValid = accountService.isValidAccount("invalid id", PASSWORD);
assertFalse(accountIsValid);
InOrder inOrder = inOrder(accountRepository, passwordEncoder);
inOrder.verify(accountRepository).findById("invalid id");
inOrder.verify(passwordEncoder, never()).encode(anyString());
}
@Test
public void shouldBeInvalidForDisabledUser(){
boolean accountIsValid =
accountService.isValidAccount(DISABLED_USER.getId(), PASSWORD);
assertFalse(accountIsValid);
verify(accountRepository).findById(DISABLED_USER.getId());
verify(passwordEncoder, never()).encode(anyString());
}
@Test
public void shouldBeInvalidForInvalidPassword() {
boolean accountIsValid =
accountService.isValidAccount(ENABLED_USER.getId(), "invalid");
assertFalse(accountIsValid);
ArgumentCaptor<String> passwordCaptor = ArgumentCaptor.forClass(String.class);
verify(passwordEncoder).encode(passwordCaptor.capture());
assertEquals("invalid", passwordCaptor.getValue());
}
private AccountRepository createAccountRepository() {
AccountRepository mock = mock(AccountRepository.class);
when(mock.findById(ENABLED_USER.getId())).thenReturn(ENABLED_USER);
when(mock.findById(DISABLED_USER.getId())).thenReturn(DISABLED_USER);
return mock;
}
private PasswordEncoder createPasswordEncoder() {
PasswordEncoder mock = mock(PasswordEncoder.class);
when(mock.encode(anyString())).thenReturn("any password hash");
when(mock.encode(PASSWORD)).thenReturn(ENABLED_USER.getPasswordHash());
return mock;
}
@Test
@DisplayName("Should Not Create Account when Id is null")
public void shouldThrowRuntimeExceptionWhenIdIsNull(){
assertThrows(RuntimeException.class, () -> {
accountService.createAccount(null, "pwd", Account.AccountStatus.ACTIVE);
});
}
@Test
@DisplayName("Should Not Create Account when password is blank")
public void shouldThrowRuntimeExceptionWhenPasswordIsNull(){
assertThrows(RuntimeException.class, () -> {
accountService.createAccount("John", "", Account.AccountStatus.ACTIVE);
});
}
@Test
@DisplayName("Should Not Create Account when status is null")
public void shouldThrowRuntimeExceptionWhenStatusIsNull(){
assertThrows(RuntimeException.class, () -> {
accountService.createAccount("John", "", null);
});
}
@Test
public void verifyCreateAccount() {
when(accountRepository.save(any(Account.class))).thenReturn(true);
assertTrue(accountService.createAccount("John", "pwd", Account.AccountStatus.ACTIVE));
verify(accountRepository).save(any(Account.class));
verify(accountRepository, times(1)).checkIfAccountAlreadyExist(any(Account.class));
verify(accountRepository, never()).delete(any(Account.class));
}
}

108
src/test/java/hs/fulda/de/ci/exam/project/AccountTest.java

@ -0,0 +1,108 @@
package hs.fulda.de.ci.exam.project;
import org.junit.jupiter.api.*;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.junit.jupiter.params.provider.ValueSource;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import static org.junit.jupiter.api.Assertions.*;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.when;
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public class AccountTest {
@BeforeAll
public void setupAll(){
System.out.println("Should Print Before All Tests");
}
Address address1;
Account account2;
Person person1;
Account account1;
@BeforeEach
public void setup() {
address1 = new Address("Fuldaer str", "Fulda", "Hessen", "36037", "Germany");
account2 = new Account("453", "notactive", Account.AccountStatus.CANCELED);
person1 = new Person("Max Mustermann", address1, "max.mustermann@gmail.com", "015147890206");
account1 = new Account("123", "password", Account.AccountStatus.ACTIVE);
}
@Test
void test_resetPassword(){
account1.resetPassword("newpass");
account2.resetPassword("notgood");
assertEquals("newpass", account1.getPassword(),"Password successfully changed.");
assertEquals("notactive", account2.getPassword(),"Activate your account to change your password");
}
@Test
@DisplayName("Should Not add Account details when Person Name is null")
public void shouldThrowRuntimeExceptionWhenPersonNameIsNull(){
assertThrows(RuntimeException.class, () -> {
account1.addAccountDetails("1",null, address1,"max.mustermann@gmail.com", "0151283290" );
});
}
@Test
@DisplayName("Should Not add Account details when Address is null")
public void shouldThrowRuntimeExceptionWhenPersonAddressIsNull(){
assertThrows(RuntimeException.class, () -> {
account1.addAccountDetails("1", "John", null,"max.mustermann@gmail.com", "0151283290" );
});
}
@DisplayName("Check if the Email is valid")
@ParameterizedTest
@MethodSource("phoneNumberList")
public void shouldThrowRuntimeExceptionWhenPhoneNumberIsNull(String phoneNumber){
assertThrows(RuntimeException.class, () -> {
account1.addAccountDetails("1","John", address1,"max.mustermann@gmail.com", phoneNumber);
});
}
private static List<String> phoneNumberList() {
return Arrays.asList("1234567", "0123", "0125314622696456", "0abnajf");
}
@Test
@DisplayName("Should Not add Account details when Email is blank")
public void shouldThrowRuntimeExceptionWhenEmailIsNull(){
assertThrows(RuntimeException.class, () -> {
account1.addAccountDetails("1", "John", address1," ", "0151283290" );
});
assertThrows(RuntimeException.class, () -> {
account1.addAccountDetails("1", "John", address1,null, "0151283290" );
});
}
@ParameterizedTest
@MethodSource("EmailList")
@DisplayName("Should Not add Account details when Email Address is not valid")
public void shouldThrowRuntimeExceptionWhenEmailIsInvalid(String email){
try{
account1.addAccountDetails("1","John", address1, email, "0151283290");
}
catch(final RuntimeException e){
String msg2 = "Email address is not Valid";
assertEquals(msg2, e.getMessage());
}
}
private static List<String> EmailList() {
return Arrays.asList("max.musterman", "12245.com");
}
}

13
src/test/java/hs/fulda/de/ci/exam/project/AddressTest.java

@ -0,0 +1,13 @@
package hs.fulda.de.ci.exam.project;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.*;
class AddressTest {
@Test
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");
}
}

151
src/test/java/hs/fulda/de/ci/exam/project/AdminTest.java

@ -0,0 +1,151 @@
package hs.fulda.de.ci.exam.project;
import org.junit.Before;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.mockito.junit.jupiter.MockitoExtension;
import java.io.IOException;
import java.util.ArrayList;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.when;
@ExtendWith(MockitoExtension.class)
public class AdminTest {
Address address_fr;
Airport airport_fr;
Address address1_ist;
Airport airport1_ist;
Flight flight1;
Address address1;
Aircraft aircraft;
@BeforeEach
public void setup() {
aircraft = new Aircraft("Boeing", "787", 2003);
address_fr = new Address("Frankfurt str", "Frankfurt", "Hessen", "63023", "Germany");
airport_fr = new Airport("Fraport", address_fr, "1234");
address1_ist = new Address("Istanbul str", "Istanbul", "Fatih", "9019", "Turkey");
airport1_ist = new Airport("Istanbul", address1_ist, "5678");
flight1 = new Flight("1", airport_fr, airport1_ist, 140);
address1 = new Address("Fuldaer str", "Fulda", "Hessen", "36037", "Germany");
}
@InjectMocks
Admin admin = new Admin("Max Muster", address1, "example@gmail.com", "012345678" );
@Mock
private AccountRepository accountRepository;
@Test
public void test_blockUser() {
ArrayList<Account> users = new ArrayList<>();
Account user = new Account("john5", "password", Account.AccountStatus.ACTIVE);
when(accountRepository.checkIfAccountAlreadyExist(user)).thenReturn(true);
admin.blockUser(user);
assertEquals(Account.AccountStatus.BLOCKED, user.getStatus(), "Status successfully changed");
}
@Mock
private FlightRepository flightRepository;
@Test
public void test_addFlight_returnsNewFlight() throws IOException {
try {
when(flightRepository.save(any(Flight.class))).thenReturn(true);
} catch (IOException e) {
e.printStackTrace();
}
try {
admin.addFlight("1", airport_fr, airport1_ist, 140);
} catch (IOException e) {
e.printStackTrace();
}
assertNotNull(admin.addFlight("1", airport_fr, airport1_ist, 140));
}
@Test
public void testAddFlight_throwsException() throws IOException {
when(flightRepository.save(any(Flight.class))).thenThrow(IOException.class);
assertThrows(IOException.class, () -> {
admin.addFlight("1", airport_fr, airport1_ist, 140);
});
}
@Test
public void shouldThrowRuntimeExceptionWhenNull(){
assertThrows(RuntimeException.class, () -> {
admin.addFlight(null, airport_fr, airport1_ist, 140);
});
assertThrows(RuntimeException.class, () -> {
admin.addFlight("1", null, airport1_ist, 140);
});
assertThrows(RuntimeException.class, () -> {
admin.addFlight("1", airport_fr, null, 140);
});
assertThrows(RuntimeException.class, () -> {
admin.addFlight("1", airport_fr, airport1_ist, -40);
});
}
@Test
public void test_searchFlightThrowsExceptionWhenBlank(){
when(flightRepository.findFlightByFlightNumber(any(String.class))).thenReturn("");
assertThrows(RuntimeException.class, () -> {
admin.searchFlights("1");
});
}
@Mock
private AircraftRepository aircraftRepository;
@Test
public void test_addAircraft_returnsNewAircraft() throws IOException {
try {
when(aircraftRepository.save(any(Aircraft.class))).thenReturn(true);
} catch (IOException e) {
e.printStackTrace();
}
assertNotNull(admin.addAircraft("Boeing", "787", 2003));
}
@Test
public void testAddAircraft_throwsException() throws IOException {
when(aircraftRepository.save(any(Aircraft.class))).thenThrow(IOException.class);
assertThrows(IOException.class, () -> {
admin.addAircraft("Boeing", "787", 2003);
});
}
@Test
public void addAircraftShouldThrowRuntimeExceptionWhenNull(){
assertThrows(RuntimeException.class, () -> {
admin.addAircraft(null, "787", 2003);
});
assertThrows(RuntimeException.class, () -> {
admin.addAircraft("Boeing", "", 2003);
});
assertThrows(RuntimeException.class, () -> {
admin.addAircraft("Boeing", "787", -2003);
});
}
@Test
public void test_searchAircraft(){
when(aircraftRepository.findAircraftByAircraftName(any(String.class))).thenReturn(aircraft.toString());
assertNotNull(admin.searchAircraft("Boeing"));
assertEquals(admin.searchAircraft("Boeing"), aircraft.toString());
}
}

59
src/test/java/hs/fulda/de/ci/exam/project/AircraftTest.java

@ -0,0 +1,59 @@
package hs.fulda.de.ci.exam.project;
import org.junit.Test;
import java.util.HashSet;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
public class AircraftTest {
Aircraft testAircraft = new Aircraft("Airbus", "Neo", 1990);
HashSet<Flight> flights = new HashSet<>();
Flight flight1 = mock(Flight.class);
Flight flight2 = mock(Flight.class);
@Test
public void testClassAircraftConstructorName() {
assertThat(testAircraft.getName())
.describedAs("get the name of aircraft")
.isEqualTo("Airbus");
}
@Test
public void testClassAircraftConstructorModel() {
assertThat(testAircraft.getModel())
.describedAs("get the model of aircraft")
.isEqualTo("Neo");
}
@Test
public void testClassAircraftConstructorManifacturingYear() {
assertThat(testAircraft.getManYear())
.describedAs("get the manifacturing year of aircraft")
.isEqualTo(1990);
}
@Test
public void test_getFlightsEmptyList() {
assertThat(testAircraft.getFlights())
.describedAs("get the manifacturing year of aircraft")
.isEqualTo(flights);
}
@Test
public void test_getFlights_wiht_2_flights() {
flights.add(flight1);
flights.add(flight2);
testAircraft.addFlight(flight1);
testAircraft.addFlight(flight2);
assertThat(testAircraft.getFlights())
.describedAs("get flights of aircraft")
.isEqualTo(flights);
}
}

51
src/test/java/hs/fulda/de/ci/exam/project/AirlineTest.java

@ -0,0 +1,51 @@
package hs.fulda.de.ci.exam.project;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.mockito.junit.MockitoJUnitRunner;
import java.util.HashSet;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.mock;
@RunWith(MockitoJUnitRunner.class)
public class AirlineTest {
Airline airline = new Airline("Pegasus", "1234");
Flight flight1 = mock(Flight.class);
HashSet<Flight> flights = new HashSet<>();
@Test
void testConstructorSetsNameParameterCorrectly() {
assertThat(airline.getName())
.describedAs("name of airline")
.isEqualTo("Pegasus");
}
@Test
void testConstructorSetsCodeParameterCorrectly() {
assertThat(airline.getCode())
.describedAs("code of airline")
.isEqualTo("1234");
}
@Test
void getFlightsReturnsEmptyListOfFlights() {
assertThat(airline.getFlights())
.describedAs("flights of airline")
.isEqualTo(flights);
}
@Test
void addFlightAddsFlightToListOfFlights() {
flights.add(flight1);
airline.addFlight(flight1);
assertThat(airline.getFlights())
.describedAs("flights of airline")
.isEqualTo(flights);
}
}

56
src/test/java/hs/fulda/de/ci/exam/project/AirportTest.java

@ -0,0 +1,56 @@
package hs.fulda.de.ci.exam.project;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.junit.jupiter.MockitoExtension;
import java.util.HashSet;
import static org.assertj.core.api.Assertions.*;
@ExtendWith(MockitoExtension.class)
public class AirportTest {
Address address_fr = new Address("Frankfurt str", "Frankfurt", "Hessen", "63023", "Germany");
Airport airport_fr = new Airport("Fraport", address_fr, "1234");
Address address1_ist = new Address("Istanbul str", "Istanbul", "Fatih", "9019", "Turkey");
Airport airport1_ist = new Airport("Istanbul", address1_ist, "5678");
Flight flight1 = new Flight("1", airport_fr, airport1_ist, 140);
Flight flight2 = new Flight("2", airport1_ist, airport_fr, 120);
@Test
void test_getName() {
assertThat(airport_fr.getName()).describedAs("get airport name").isEqualTo("Fraport");
}
@Test
void test_getCode() {
assertThat(airport_fr.getCode()).describedAs("get airport code").isEqualTo("1234");
}
@Test
void test_getAddress() {
assertThat(airport_fr.getAddress()).describedAs("get address of airport").isEqualTo(address_fr);
}
@Test
void test_getFlights() {
HashSet<Flight> flist = new HashSet<>();
flist.add(flight1);
airport_fr.flights.add(flight1);
assertThat(airport_fr.getFlights()).describedAs("get all flights of the airport").isEqualTo(flist);
}
@Test
void test_getFlights_wiht_2_flights() {
HashSet<Flight> flist = new HashSet<>();
flist.add(flight1);
flist.add(flight2);
airport_fr.flights.add(flight1);
airport_fr.flights.add(flight2);
assertThat(airport_fr.getFlights()).describedAs("get all flights of the airport").isEqualTo(flist);
}
}

66
src/test/java/hs/fulda/de/ci/exam/project/CustomerTest.java

@ -0,0 +1,66 @@
package hs.fulda.de.ci.exam.project;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import static org.mockito.Mockito.*;
import org.mockito.junit.jupiter.MockitoExtension;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Date;
import static org.junit.jupiter.api.Assertions.assertEquals;
@ExtendWith(MockitoExtension.class)
public class CustomerTest {
final Address address1 = new Address("Fuldaer str", "Fulda", "Hessen", "36037", "Germany");
@InjectMocks
final Customer person1 = new Customer("Max Mustermann", address1, "max.mustermann@gmail.com", "015147890206");
@Test
public void test_setFlyingNumber() throws NoSuchFieldException, IllegalAccessException{
person1.setFrequentFlyerNumber("5");
final Field field = person1.getClass().getDeclaredField("frequentFlyerNumber");
field.setAccessible(true);
assertEquals(field.get(person1), "5","set frequent flying number of the customer");
}
@Test
public void test_getFlyingNumber() throws NoSuchFieldException, IllegalAccessException {
final Field field = person1.getClass().getDeclaredField("frequentFlyerNumber");
field.setAccessible(true);
field.set(person1, "10");
final String result = person1.getFrequentFlyerNumber();
assertEquals(result, "10","get frequent flying number of the customer");
}
@Mock
private ItineraryRepository itineraryRepo;
@Test
public void test_getItineraries() {
ArrayList<Itinerary> itineraries = new ArrayList<>();
Airport airport_fr = new Airport("Fraport", address1, "1234");
Airport airport_be = new Airport("Berlin", address1, "5678");
Itinerary item1 = new Itinerary(airport_fr, airport_be, new Date());
Itinerary item2 = new Itinerary(airport_be, airport_fr, new Date());
itineraries.add(item1);
itineraries.add(item2);
when(itineraryRepo.findAll()).thenReturn(itineraries);
ArrayList<Itinerary> new_itineraries = person1.getItineraries();
assertEquals(2, new_itineraries.size(), "Sizes are equal");
}
}

11
src/test/java/hs/fulda/de/ci/exam/project/ExampleClassTest.java

@ -1,11 +0,0 @@
package hs.fulda.de.ci.exam.project;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
public class ExampleClassTest {
@Test
void testExampleClass() {
assertTrue(true);
}
}

84
src/test/java/hs/fulda/de/ci/exam/project/FlightTest.java

@ -0,0 +1,84 @@
package hs.fulda.de.ci.exam.project;
import org.junit.jupiter.api.Test;
import java.sql.Time;
import java.util.HashSet;
import static hs.fulda.de.ci.exam.project.FlightStatus.Active;
import static hs.fulda.de.ci.exam.project.FlightStatus.Cancelled;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertTrue;
class FlightTest {
Address address_fr = new Address("Frankfurt str", "Frankfurt", "Hessen", "63023", "Germany");
Airport airport_fr = new Airport("Fraport", address_fr, "1234");
Address address1_ist = new Address("Istanbul str", "Istanbul", "Fatih", "9019", "Turkey");
Airport airport1_ist = new Airport("Istanbul", address1_ist, "5678");
Flight flight1 = new Flight("1", airport_fr, airport1_ist, 140);
Flight flight2 = new Flight("2", airport1_ist, airport_fr, 120);
FlightInstance fInstance1 = new FlightInstance(new Time(12, 45, 00), "4E", Active);
@Test
void getInstances_no_instance_should_be_equal() {
HashSet<FlightInstance> empty_list = new HashSet<>();
assertThat(flight1.getInstances()).describedAs("get flight instances of the flight ").isEqualTo(empty_list);
}
@Test
void getInstances_not_empty_list_should_be_equal() {
HashSet<FlightInstance> list = new HashSet<>();
list.add(fInstance1);
flight1.flightInstances.add(fInstance1);
assertThat(flight1.getInstances()).describedAs("get flight instances of the flight ").isEqualTo(list);
}
@Test
void addFlightScheduleShoudlAddFlightInstanceWithActiveStatus() {
boolean addInstance = flight1.addFlightSchedule(fInstance1);
assertTrue(addInstance);
FlightStatus result = flight1.getFlightInstance(fInstance1).getStatus();
FlightStatus expected = Active;
assertThat(expected).isEqualTo(result);
}
@Test
void cancelingFlightShouldChangeActiveToCancelled() {
boolean addInstance = flight1.addFlightSchedule(fInstance1);
assertTrue(addInstance);
flight1.cancel(fInstance1);
FlightStatus result = flight1.getFlightInstance(fInstance1).getStatus();
FlightStatus expected = Cancelled;
assertThat(expected).isEqualTo(result);
}
@Test
void getFlightNumber() {
assertThat(flight1.getFlightNumber()).describedAs("get flight number of the flight").isEqualTo("1");
}
@Test
void getDeparture() {
assertThat(flight1.getDeparture()).describedAs("get departure of flight").isEqualTo(airport_fr);
}
@Test
void getArrival() {
assertThat(flight1.getArrival()).describedAs("get arrival of flight").isEqualTo(airport1_ist);
}
@Test
void getDurationInMinutes() {
assertThat(flight1.getDurationInMinutes()).describedAs("get duration of flight").isEqualTo(140);
}
}

53
src/test/java/hs/fulda/de/ci/exam/project/FrontDeskOfficerTest.java

@ -0,0 +1,53 @@
package hs.fulda.de.ci.exam.project;
import org.junit.Before;
import org.junit.jupiter.api.*;
import org.mockito.InjectMocks;
import java.util.Date;
import static org.junit.jupiter.api.Assertions.*;
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
public class FrontDeskOfficerTest {
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
public void shouldCreateItinerary() {
frontDeskOfficer.createItinerary(airport_fr, airport_be, new Date());
assertFalse(frontDeskOfficer.getAllItineraries().isEmpty());
assertEquals(1, frontDeskOfficer.getAllItineraries().size());
assertTrue(frontDeskOfficer.getAllItineraries().stream().filter(itinerary -> itinerary.getStart_airport().equals(airport_fr) &&
itinerary.getFinal_airport().equals(airport_be)).findAny().isPresent());
}
@Test
@DisplayName("Should Not Create Itinerary when Starting Airport is null")
public void shouldThrowRuntimeExceptionWhenStartAirportIsNull(){
assertThrows(RuntimeException.class, () -> {
frontDeskOfficer.createItinerary(null, airport_be, new Date());
});
}
@Test
@DisplayName("Should Not Create Itinerary when Destination Airport is null")
public void shouldThrowRuntimeExceptionWhenFinalAirportIsNull(){
assertThrows(RuntimeException.class, () -> {
frontDeskOfficer.createItinerary(airport_fr, airport_be, null);
});
}
}

112
src/test/java/hs/fulda/de/ci/exam/project/ItineraryTest.java

@ -0,0 +1,112 @@
package hs.fulda.de.ci.exam.project;
import org.junit.Assert;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.*;
import org.mockito.junit.jupiter.MockitoExtension;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ExtendWith(MockitoExtension.class)
public class ItineraryTest {
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 Itinerary item2 = new Itinerary(airport_be, airport_fr, new Date());
@InjectMocks
final Customer person1 = new Customer("Max Mustermann", address1, "max.mustermann@gmail.com", "015147890206");
final Itinerary item1 = new Itinerary(airport_fr, airport_be, new Date());
@Mock
private ItineraryRepository itineraryRepo;
@Mock
private FlightReservationRepository flightReservationRepository;
@Test
public void test_makePayment() {
ArrayList<Itinerary> itineraries = new ArrayList<>();
itineraries.add(item1);
itineraries.add(item2);
when(person1.getItineraries()).thenReturn(itineraries);
boolean actualWithCredit = item1.makePayment(new FlightReservation(),"Credit", person1, 450);
boolean actualWithCash = item1.makePayment(new FlightReservation(), "Cash", person1, 450);
boolean actualWithCheck = item1.makePayment(new FlightReservation(), "Check", person1, 450);
boolean actualEmpty = item1.makePayment(new FlightReservation(), " ", person1, 450);
assertEquals(true, actualWithCash, "The Payment method is successfully chosen");
assertEquals(true, actualWithCash, "The Payment method is successfully chosen");
assertEquals(true, actualWithCredit, "The Payment method is successfully chosen");
assertEquals(true, actualWithCheck, "The Payment method is successfully chosen");
assertEquals(false, actualEmpty, "The Payment method is wrong");
}
@Test
public void test_makePaymentStatus(){
FlightReservation flightReservation = new FlightReservation();
item1.makePayment(flightReservation,"Credit", person1, 450);
assertEquals(flightReservation.getStatus(), ReservationStatus.Pending);
}
@Test
@DisplayName("Should Not Make Reservation when Passenger name is null")
public void shouldThrowRuntimeExceptionWhenNameIsNull() {
String msg = null;
try {
item1.makeReservation(new FlightSeat(1000.0, "5"), new Passenger("", "Ab", new Date()));
} catch (Exception e) {
msg = e.getMessage();
}
assertEquals("Name cannot be null or empty", msg);
}
@DisplayName("Should Not Make Reservation when Passenger passport number is invalid")
@ParameterizedTest
@MethodSource("passportNumberList")
public void shouldThrowRuntimeExceptionWhenPhoneNumberIsNull(String passportNumber) {
String msg = null;
try {
item1.makeReservation(new FlightSeat(1000.0, "5"), new Passenger("John", passportNumber, new Date()));
} catch (Exception e) {
msg = e.getMessage();
}
assertEquals("Passport number cannot be null or empty", msg);
}
private static List<String> passportNumberList() {
return Arrays.asList("A2", "000000", "AB231837%8");
}
@Test
@DisplayName("Should Not Make Reservation when Passenger Birthdate is null")
public void shouldThrowRuntimeExceptionWhenDateIsNull() {
assertThrows(RuntimeException.class, () -> {
item1.makeReservation(new FlightSeat(1000.0, "5"), new Passenger("John", "AB127389", null));
});
}
@Test
public void test_makeReservation() {
FlightReservation flightreservation = item2.makeReservation(new FlightSeat(1000.0, "5"), new Passenger("John", "AB2389", new Date()));
assertNotNull(flightreservation);
assertEquals(flightreservation.getStatus(), ReservationStatus.Requested);
}
}

60
src/test/java/hs/fulda/de/ci/exam/project/NotificationTest.java

@ -0,0 +1,60 @@
package hs.fulda.de.ci.exam.project;
import org.junit.Test;
import static hs.fulda.de.ci.exam.project.ReservationStatus.Confirmed;
import static org.assertj.core.api.Assertions.assertThat;
public class NotificationTest {
EmailNotification email = new EmailNotification("test@gmail.com", "HelloWorld");
EmailNotification emailInvalid = new EmailNotification("testgmail.com", "HelloWorld");
FlightReservation reservation = new FlightReservation();
SmsNotification sms = new SmsNotification("01788370107", "Reservation confirmed");
SmsNotification smsInvalid = new SmsNotification("123", "Some Wrong Number");
@Test
public void emailValidiationShouldReturnTrueForValidEmail() {
boolean result = email.sendNotification();
boolean expected = true;
assertThat(expected).isEqualTo(result);
}
@Test
public void emailValidiationShouldReturnFalseForInValidEmail() {
boolean result = emailInvalid.sendNotification();
boolean expected = false;
assertThat(expected).isEqualTo(result);
}
@Test
public void emailNotificationShouldBeSentWhenFlighReservationCompleted() {
reservation.setStatus(Confirmed);
boolean result = reservation.notifyUser("email", "test@gmail.com", "Reservation is Confirmed!");
boolean expected = true;
assertThat(expected).isEqualTo(result);
}
@Test
public void smsNotificationShouldBeSentWhenSmsTypeIsChosen() {
reservation.setStatus(Confirmed);
boolean result = reservation.notifyUser("sms", "01788370107", "Reservation is successfull");
boolean expected = true;
assertThat(expected).isEqualTo(result);
}
@Test
public void smsIsSentWhenNumberIsValid() {
boolean result = sms.sendNotification();
boolean expected = true;
assertThat(expected).isEqualTo(result);
}
@Test
public void smsShouldNotBeSentWhenNumberIsInvalid() {
boolean result = smsInvalid.sendNotification();
boolean expected = false;
assertThat(expected).isEqualTo(result);
}
}

57
src/test/java/hs/fulda/de/ci/exam/project/PaymentTest.java

@ -0,0 +1,57 @@
package hs.fulda.de.ci.exam.project;
import org.junit.Test;
import static hs.fulda.de.ci.exam.project.PaymentStatus.*;
import static hs.fulda.de.ci.exam.project.ReservationStatus.Confirmed;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class PaymentTest {
@Test
public void should_be_possible_to_pay_with_credit_card(){
Payment credit_card_payment = new CreditCardTransaction(11, "139€", Unpaid, "01234567890123456789");
FlightReservation reservation = new FlightReservation();
reservation.makePayment(credit_card_payment);
assertEquals(Confirmed, reservation.getStatus());
assertEquals(Completed, credit_card_payment.status);
}
@Test
public void should_be_possible_to_pay_with_bank_account(){
FlightReservation reservation = new FlightReservation();
BankTransaction payment = new BankTransaction(11, "139€", Unpaid, "Sparkasse Fulda", "DE01234567890123456789");
reservation.makePayment(payment);
assertEquals(Confirmed, reservation.getStatus());
assertEquals(Completed, payment.status);
}
@Test
public void paymentShould_not_be_possible_if_credit_card_deatils_is_wrong(){
CreditCardTransaction credit_card_payment = new CreditCardTransaction(11, "139€", Unpaid, "123");
FlightReservation reservation = new FlightReservation();
reservation.makePayment(credit_card_payment);
assertEquals(ReservationStatus.Cancelled, reservation.getStatus());
assertEquals(Failed, credit_card_payment.status);
}
@Test
public void paymentShould_not_be_possible_if_iban_is_wrong(){
BankTransaction bank_payment = new BankTransaction(11, "139€", Unpaid, "Sparkasse Fulda", "DE012");
FlightReservation reservation = new FlightReservation();
reservation.makePayment(bank_payment);
assertEquals(ReservationStatus.Cancelled, reservation.getStatus());
assertEquals(Failed, bank_payment.status);
}
@Test
public void cashPaymentShouldBePossible(){
CashTransaction cash_payment = new CashTransaction(11, "139€", Unpaid);
FlightReservation reservation = new FlightReservation();
reservation.makePayment(cash_payment);
assertEquals(Confirmed, reservation.getStatus());
assertEquals(Completed, cash_payment.status);
}
}

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

@ -0,0 +1,70 @@
package hs.fulda.de.ci.exam.project;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import java.util.ArrayList;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.when;
@ExtendWith(MockitoExtension.class)
public class PersonTest {
Address address_fr = new Address("Frankfurt str", "Frankfurt", "Hessen", "63023", "Germany");
Airport airport_fr = new Airport("Fraport", address_fr, "1234");
Address address1_ist = new Address("Istanbul str", "Istanbul", "Fatih", "9019", "Turkey");
Airport airport1_ist = new Airport("Istanbul", address1_ist, "5678");
Address address1 = new Address("Fuldaer str", "Fulda", "Hessen", "36037", "Germany");
@InjectMocks
Person person1 = new Person("Max Mustermann", address1, "max.mustermann@gmail.com", "015147890206");
@Mock
private FlightRepository flightRepository;
@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");
}
@Test
public void test_searchAllFlightsByCriteria(){
ArrayList<String> flights = new ArrayList<>();
flights.add("Flight1");
when(flightRepository.findbyDepartureArrival(airport_fr, airport1_ist)).thenReturn(flights);
assertNotNull(person1.searchAllFlightsByCriteria(airport_fr, airport1_ist));
}
@Test
public void test_searchFlight(){
Flight flight1 = new Flight("1", airport_fr, airport1_ist, 140);
when(flightRepository.findFlightByFlightNumber(any(String.class))).thenReturn(flight1.toString());
assertNotNull(person1.searchFlights("1"));
assertEquals(person1.searchFlights("1"), flight1.toString());
}
}

29
src/test/java/hs/fulda/de/ci/exam/project/SeatTest.java

@ -0,0 +1,29 @@
package hs.fulda.de.ci.exam.project;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class SeatTest {
@Test
public void testIfConstructorSetsValues() {
FlightSeat fSeat = new FlightSeat(100.0, "1234");
assertThat(fSeat.getFare()).isEqualTo(100.0);
assertThat(fSeat.getReservationNumber()).isEqualTo("1234");
}
@Test
public void testParentSeatClassConstructor() {
Seat seat = new Seat("14F", SeatType.Regular, SeatClass.Economy);
assertThat(seat.getSeatNumber()).isEqualTo("14F");
assertThat(seat.getSeatType()).isEqualTo(SeatType.Regular);
assertThat(seat.getSeatClass()).isEqualTo(SeatClass.Economy);
}
@Test
public void testMakingFlightTestParentClass(){
Seat seat = new FlightSeat(100.0, "1234");
assertThat(((FlightSeat) seat).getFare()).isEqualTo(100.0);
assertThat(((FlightSeat) seat).getReservationNumber()).isEqualTo("1234");
}
}

BIN
target/AirlineManagementSystem-1.0-SNAPSHOT.jar

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

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

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

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

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

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

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

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

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

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

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

BIN
target/classes/img.png

After

Width: 750  |  Height: 813  |  Size: 259 KiB

2
target/maven-archiver/pom.properties

@ -1,5 +1,5 @@
#Generated by Maven
#Mon Jan 24 12:13:24 CET 2022
#Sat Jan 29 15:33:12 CET 2022
groupId=hs.fulda.de.ci.exam.project
artifactId=AirlineManagementSystem
version=1.0-SNAPSHOT

5
target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst

@ -1 +1,4 @@
hs/fulda/de/ci/exam/project/ExampleClass.class
hs/fulda/de/ci/exam/project/FlightInstance.class
hs/fulda/de/ci/exam/project/Airport.class
hs/fulda/de/ci/exam/project/Address.class
hs/fulda/de/ci/exam/project/Flight.class

5
target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@ -1 +1,4 @@
/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/src/main/java/hs/fulda/de/ci/exam/project/ExampleClass.java
/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/src/main/java/hs/fulda/de/ci/exam/project/Airport.java
/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/src/main/java/hs/fulda/de/ci/exam/project/Address.java
/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/src/main/java/hs/fulda/de/ci/exam/project/FlightInstance.java
/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/src/main/java/hs/fulda/de/ci/exam/project/Flight.java

4
target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst

@ -1 +1,3 @@
hs/fulda/de/ci/exam/project/ExampleClassTest.class
hs/fulda/de/ci/exam/project/AddressTest.class
hs/fulda/de/ci/exam/project/FlightTest.class
hs/fulda/de/ci/exam/project/AirportTest.class

4
target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst

@ -1 +1,3 @@
/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/src/test/java/hs/fulda/de/ci/exam/project/ExampleClassTest.java
/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/src/test/java/hs/fulda/de/ci/exam/project/FlightTest.java
/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/src/test/java/hs/fulda/de/ci/exam/project/AirportTest.java
/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/src/test/java/hs/fulda/de/ci/exam/project/AddressTest.java

62
target/surefire-reports/TEST-TestExample.xml

@ -1,62 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="TestExample" time="0" tests="1" errors="0" skipped="0" failures="0">
<properties>
<property name="gopherProxySet" value="false"/>
<property name="awt.toolkit" value="sun.lwawt.macosx.LWCToolkit"/>
<property name="java.specification.version" value="11"/>
<property name="sun.cpu.isalist" value=""/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.class.path" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/test-classes:/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/classes:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar:/Users/imron/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar:/Users/imron/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar:/Users/imron/.m2/repository/org/assertj/assertj-core/3.21.0/assertj-core-3.21.0.jar:/Users/imron/.m2/repository/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy/1.12.1/byte-buddy-1.12.1.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.1/byte-buddy-agent-1.12.1.jar:/Users/imron/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/imron/.m2/repository/org/mockito/mockito-junit-jupiter/4.1.0/mockito-junit-jupiter-4.1.0.jar:"/>
<property name="java.vm.vendor" value="Eclipse Foundation"/>
<property name="sun.arch.data.model" value="64"/>
<property name="java.vendor.url" value="https://adoptium.net/"/>
<property name="user.timezone" value=""/>
<property name="java.vm.specification.version" value="11"/>
<property name="os.name" value="Mac OS X"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="GB"/>
<property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home/lib"/>
<property name="sun.java.command" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire/surefirebooter8370096089872119334.jar /Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire 2022-01-24T12-30-01_278-jvmRun1 surefire13828064973045541402tmp surefire_012113335289164957114tmp"/>
<property name="jdk.debug" value="release"/>
<property name="surefire.test.class.path" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/test-classes:/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/classes:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar:/Users/imron/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar:/Users/imron/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar:/Users/imron/.m2/repository/org/assertj/assertj-core/3.21.0/assertj-core-3.21.0.jar:/Users/imron/.m2/repository/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy/1.12.1/byte-buddy-1.12.1.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.1/byte-buddy-agent-1.12.1.jar:/Users/imron/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/imron/.m2/repository/org/mockito/mockito-junit-jupiter/4.1.0/mockito-junit-jupiter-4.1.0.jar:"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.home" value="/Users/imron"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2021-07-20"/>
<property name="java.home" value="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home"/>
<property name="file.separator" value="/"/>
<property name="basedir" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.awt.graphicsenv" value="sun.awt.CGraphicsEnvironment"/>
<property name="surefire.real.class.path" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire/surefirebooter8370096089872119334.jar"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="java.runtime.version" value="11.0.12+7"/>
<property name="user.name" value="imron"/>
<property name="path.separator" value=":"/>
<property name="os.version" value="11.1"/>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="Temurin-11.0.12+7"/>
<property name="localRepository" value="/Users/imron/.m2/repository"/>
<property name="java.vendor.url.bug" value="https://github.com/adoptium/adoptium-support/issues"/>
<property name="java.io.tmpdir" value="/var/folders/q8/1t6qjhh97rnbw4mjxv9d4nv40000gr/T/"/>
<property name="java.version" value="11.0.12"/>
<property name="user.dir" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem"/>
<property name="os.arch" value="x86_64"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="java.awt.printerjob" value="sun.lwawt.macosx.CPrinterJob"/>
<property name="sun.os.patch.level" value="unknown"/>
<property name="java.library.path" value="/Users/imron/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:."/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.vendor" value="Eclipse Foundation"/>
<property name="java.vm.version" value="11.0.12+7"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="java.class.version" value="55.0"/>
</properties>
<testcase name="testExampleClass1" classname="TestExample" time="0"/>
</testsuite>

62
target/surefire-reports/TEST-hs.fulda.de.ci.exam.project.AddressTest.xml

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="hs.fulda.de.ci.exam.project.AddressTest" time="0.013" tests="1" errors="0" skipped="0" failures="0">
<properties>
<property name="gopherProxySet" value="false"/>
<property name="awt.toolkit" value="sun.lwawt.macosx.LWCToolkit"/>
<property name="java.specification.version" value="11"/>
<property name="sun.cpu.isalist" value=""/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.class.path" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/test-classes:/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/classes:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar:/Users/imron/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar:/Users/imron/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar:/Users/imron/.m2/repository/org/assertj/assertj-core/3.21.0/assertj-core-3.21.0.jar:/Users/imron/.m2/repository/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy/1.12.1/byte-buddy-1.12.1.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.1/byte-buddy-agent-1.12.1.jar:/Users/imron/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/imron/.m2/repository/org/mockito/mockito-junit-jupiter/4.1.0/mockito-junit-jupiter-4.1.0.jar:/Users/imron/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar:"/>
<property name="java.vm.vendor" value="Eclipse Foundation"/>
<property name="sun.arch.data.model" value="64"/>
<property name="java.vendor.url" value="https://adoptium.net/"/>
<property name="user.timezone" value=""/>
<property name="java.vm.specification.version" value="11"/>
<property name="os.name" value="Mac OS X"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="GB"/>
<property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home/lib"/>
<property name="sun.java.command" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire/surefirebooter2204197978634362627.jar /Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire 2022-01-30T21-31-27_696-jvmRun1 surefire5553060618833826792tmp surefire_07801071289263107391tmp"/>
<property name="jdk.debug" value="release"/>
<property name="surefire.test.class.path" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/test-classes:/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/classes:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar:/Users/imron/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar:/Users/imron/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar:/Users/imron/.m2/repository/org/assertj/assertj-core/3.21.0/assertj-core-3.21.0.jar:/Users/imron/.m2/repository/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy/1.12.1/byte-buddy-1.12.1.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.1/byte-buddy-agent-1.12.1.jar:/Users/imron/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/imron/.m2/repository/org/mockito/mockito-junit-jupiter/4.1.0/mockito-junit-jupiter-4.1.0.jar:/Users/imron/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar:"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.home" value="/Users/imron"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2021-07-20"/>
<property name="java.home" value="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home"/>
<property name="file.separator" value="/"/>
<property name="basedir" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.awt.graphicsenv" value="sun.awt.CGraphicsEnvironment"/>
<property name="surefire.real.class.path" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire/surefirebooter2204197978634362627.jar"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="java.runtime.version" value="11.0.12+7"/>
<property name="user.name" value="imron"/>
<property name="path.separator" value=":"/>
<property name="os.version" value="11.1"/>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="Temurin-11.0.12+7"/>
<property name="localRepository" value="/Users/imron/.m2/repository"/>
<property name="java.vendor.url.bug" value="https://github.com/adoptium/adoptium-support/issues"/>
<property name="java.io.tmpdir" value="/var/folders/q8/1t6qjhh97rnbw4mjxv9d4nv40000gr/T/"/>
<property name="java.version" value="11.0.12"/>
<property name="user.dir" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem"/>
<property name="os.arch" value="x86_64"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="java.awt.printerjob" value="sun.lwawt.macosx.CPrinterJob"/>
<property name="sun.os.patch.level" value="unknown"/>
<property name="java.library.path" value="/Users/imron/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:."/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.vendor" value="Eclipse Foundation"/>
<property name="java.vm.version" value="11.0.12+7"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="java.class.version" value="55.0"/>
</properties>
<testcase name="testToString_Adress" classname="hs.fulda.de.ci.exam.project.AddressTest" time="0.013"/>
</testsuite>

65
target/surefire-reports/TEST-hs.fulda.de.ci.exam.project.AirlineTest.xml

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="hs.fulda.de.ci.exam.project.AirlineTest" time="0.096" tests="4" errors="0" skipped="0" failures="0">
<properties>
<property name="gopherProxySet" value="false"/>
<property name="awt.toolkit" value="sun.lwawt.macosx.LWCToolkit"/>
<property name="java.specification.version" value="11"/>
<property name="sun.cpu.isalist" value=""/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.class.path" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/test-classes:/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/classes:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar:/Users/imron/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar:/Users/imron/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar:/Users/imron/.m2/repository/org/assertj/assertj-core/3.21.0/assertj-core-3.21.0.jar:/Users/imron/.m2/repository/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy/1.12.1/byte-buddy-1.12.1.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.1/byte-buddy-agent-1.12.1.jar:/Users/imron/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/imron/.m2/repository/org/mockito/mockito-junit-jupiter/4.1.0/mockito-junit-jupiter-4.1.0.jar:/Users/imron/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar:"/>
<property name="java.vm.vendor" value="Eclipse Foundation"/>
<property name="sun.arch.data.model" value="64"/>
<property name="java.vendor.url" value="https://adoptium.net/"/>
<property name="user.timezone" value=""/>
<property name="java.vm.specification.version" value="11"/>
<property name="os.name" value="Mac OS X"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="GB"/>
<property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home/lib"/>
<property name="sun.java.command" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire/surefirebooter2204197978634362627.jar /Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire 2022-01-30T21-31-27_696-jvmRun1 surefire5553060618833826792tmp surefire_07801071289263107391tmp"/>
<property name="jdk.debug" value="release"/>
<property name="surefire.test.class.path" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/test-classes:/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/classes:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar:/Users/imron/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar:/Users/imron/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar:/Users/imron/.m2/repository/org/assertj/assertj-core/3.21.0/assertj-core-3.21.0.jar:/Users/imron/.m2/repository/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy/1.12.1/byte-buddy-1.12.1.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.1/byte-buddy-agent-1.12.1.jar:/Users/imron/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/imron/.m2/repository/org/mockito/mockito-junit-jupiter/4.1.0/mockito-junit-jupiter-4.1.0.jar:/Users/imron/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar:"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.home" value="/Users/imron"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2021-07-20"/>
<property name="java.home" value="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home"/>
<property name="file.separator" value="/"/>
<property name="basedir" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.awt.graphicsenv" value="sun.awt.CGraphicsEnvironment"/>
<property name="surefire.real.class.path" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire/surefirebooter2204197978634362627.jar"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="java.runtime.version" value="11.0.12+7"/>
<property name="user.name" value="imron"/>
<property name="path.separator" value=":"/>
<property name="os.version" value="11.1"/>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="Temurin-11.0.12+7"/>
<property name="localRepository" value="/Users/imron/.m2/repository"/>
<property name="java.vendor.url.bug" value="https://github.com/adoptium/adoptium-support/issues"/>
<property name="java.io.tmpdir" value="/var/folders/q8/1t6qjhh97rnbw4mjxv9d4nv40000gr/T/"/>
<property name="java.version" value="11.0.12"/>
<property name="user.dir" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem"/>
<property name="os.arch" value="x86_64"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="java.awt.printerjob" value="sun.lwawt.macosx.CPrinterJob"/>
<property name="sun.os.patch.level" value="unknown"/>
<property name="java.library.path" value="/Users/imron/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:."/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.vendor" value="Eclipse Foundation"/>
<property name="java.vm.version" value="11.0.12+7"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="java.class.version" value="55.0"/>
</properties>
<testcase name="testConstructorSetsNameParameterCorrectly" classname="hs.fulda.de.ci.exam.project.AirlineTest" time="0"/>
<testcase name="addFlightAddsFlightToListOfFlights" classname="hs.fulda.de.ci.exam.project.AirlineTest" time="0"/>
<testcase name="getFlightsReturnsEmptyListOfFlights" classname="hs.fulda.de.ci.exam.project.AirlineTest" time="0.001"/>
<testcase name="testConstructorSetsCodeParameterCorrectly" classname="hs.fulda.de.ci.exam.project.AirlineTest" time="0"/>
</testsuite>

66
target/surefire-reports/TEST-hs.fulda.de.ci.exam.project.AirportTest.xml

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="hs.fulda.de.ci.exam.project.AirportTest" time="0.253" tests="5" errors="0" skipped="0" failures="0">
<properties>
<property name="gopherProxySet" value="false"/>
<property name="awt.toolkit" value="sun.lwawt.macosx.LWCToolkit"/>
<property name="java.specification.version" value="11"/>
<property name="sun.cpu.isalist" value=""/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.class.path" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/test-classes:/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/classes:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar:/Users/imron/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar:/Users/imron/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar:/Users/imron/.m2/repository/org/assertj/assertj-core/3.21.0/assertj-core-3.21.0.jar:/Users/imron/.m2/repository/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy/1.12.1/byte-buddy-1.12.1.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.1/byte-buddy-agent-1.12.1.jar:/Users/imron/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/imron/.m2/repository/org/mockito/mockito-junit-jupiter/4.1.0/mockito-junit-jupiter-4.1.0.jar:/Users/imron/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar:"/>
<property name="java.vm.vendor" value="Eclipse Foundation"/>
<property name="sun.arch.data.model" value="64"/>
<property name="java.vendor.url" value="https://adoptium.net/"/>
<property name="user.timezone" value=""/>
<property name="java.vm.specification.version" value="11"/>
<property name="os.name" value="Mac OS X"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="GB"/>
<property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home/lib"/>
<property name="sun.java.command" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire/surefirebooter2204197978634362627.jar /Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire 2022-01-30T21-31-27_696-jvmRun1 surefire5553060618833826792tmp surefire_07801071289263107391tmp"/>
<property name="jdk.debug" value="release"/>
<property name="surefire.test.class.path" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/test-classes:/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/classes:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar:/Users/imron/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar:/Users/imron/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar:/Users/imron/.m2/repository/org/assertj/assertj-core/3.21.0/assertj-core-3.21.0.jar:/Users/imron/.m2/repository/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy/1.12.1/byte-buddy-1.12.1.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.1/byte-buddy-agent-1.12.1.jar:/Users/imron/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/imron/.m2/repository/org/mockito/mockito-junit-jupiter/4.1.0/mockito-junit-jupiter-4.1.0.jar:/Users/imron/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar:"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.home" value="/Users/imron"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2021-07-20"/>
<property name="java.home" value="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home"/>
<property name="file.separator" value="/"/>
<property name="basedir" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.awt.graphicsenv" value="sun.awt.CGraphicsEnvironment"/>
<property name="surefire.real.class.path" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire/surefirebooter2204197978634362627.jar"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="java.runtime.version" value="11.0.12+7"/>
<property name="user.name" value="imron"/>
<property name="path.separator" value=":"/>
<property name="os.version" value="11.1"/>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="Temurin-11.0.12+7"/>
<property name="localRepository" value="/Users/imron/.m2/repository"/>
<property name="java.vendor.url.bug" value="https://github.com/adoptium/adoptium-support/issues"/>
<property name="java.io.tmpdir" value="/var/folders/q8/1t6qjhh97rnbw4mjxv9d4nv40000gr/T/"/>
<property name="java.version" value="11.0.12"/>
<property name="user.dir" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem"/>
<property name="os.arch" value="x86_64"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="java.awt.printerjob" value="sun.lwawt.macosx.CPrinterJob"/>
<property name="sun.os.patch.level" value="unknown"/>
<property name="java.library.path" value="/Users/imron/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:."/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.vendor" value="Eclipse Foundation"/>
<property name="java.vm.version" value="11.0.12+7"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="java.class.version" value="55.0"/>
</properties>
<testcase name="test_getCode" classname="hs.fulda.de.ci.exam.project.AirportTest" time="0.249"/>
<testcase name="test_getName" classname="hs.fulda.de.ci.exam.project.AirportTest" time="0"/>
<testcase name="test_getAddress" classname="hs.fulda.de.ci.exam.project.AirportTest" time="0"/>
<testcase name="test_getFlights" classname="hs.fulda.de.ci.exam.project.AirportTest" time="0.001"/>
<testcase name="test_getFlights_wiht_2_flights" classname="hs.fulda.de.ci.exam.project.AirportTest" time="0.001"/>
</testsuite>

62
target/surefire-reports/TEST-hs.fulda.de.ci.exam.project.ExampleClassTest.xml

@ -1,62 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="hs.fulda.de.ci.exam.project.ExampleClassTest" time="0.022" tests="1" errors="0" skipped="0" failures="0">
<properties>
<property name="gopherProxySet" value="false"/>
<property name="awt.toolkit" value="sun.lwawt.macosx.LWCToolkit"/>
<property name="java.specification.version" value="11"/>
<property name="sun.cpu.isalist" value=""/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.class.path" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/test-classes:/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/classes:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar:/Users/imron/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar:/Users/imron/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar:/Users/imron/.m2/repository/org/assertj/assertj-core/3.21.0/assertj-core-3.21.0.jar:/Users/imron/.m2/repository/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy/1.12.1/byte-buddy-1.12.1.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.1/byte-buddy-agent-1.12.1.jar:/Users/imron/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/imron/.m2/repository/org/mockito/mockito-junit-jupiter/4.1.0/mockito-junit-jupiter-4.1.0.jar:"/>
<property name="java.vm.vendor" value="Eclipse Foundation"/>
<property name="sun.arch.data.model" value="64"/>
<property name="java.vendor.url" value="https://adoptium.net/"/>
<property name="user.timezone" value=""/>
<property name="java.vm.specification.version" value="11"/>
<property name="os.name" value="Mac OS X"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="GB"/>
<property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home/lib"/>
<property name="sun.java.command" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire/surefirebooter8370096089872119334.jar /Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire 2022-01-24T12-30-01_278-jvmRun1 surefire13828064973045541402tmp surefire_012113335289164957114tmp"/>
<property name="jdk.debug" value="release"/>
<property name="surefire.test.class.path" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/test-classes:/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/classes:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar:/Users/imron/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar:/Users/imron/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar:/Users/imron/.m2/repository/org/assertj/assertj-core/3.21.0/assertj-core-3.21.0.jar:/Users/imron/.m2/repository/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy/1.12.1/byte-buddy-1.12.1.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.1/byte-buddy-agent-1.12.1.jar:/Users/imron/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/imron/.m2/repository/org/mockito/mockito-junit-jupiter/4.1.0/mockito-junit-jupiter-4.1.0.jar:"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.home" value="/Users/imron"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2021-07-20"/>
<property name="java.home" value="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home"/>
<property name="file.separator" value="/"/>
<property name="basedir" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.awt.graphicsenv" value="sun.awt.CGraphicsEnvironment"/>
<property name="surefire.real.class.path" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire/surefirebooter8370096089872119334.jar"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="java.runtime.version" value="11.0.12+7"/>
<property name="user.name" value="imron"/>
<property name="path.separator" value=":"/>
<property name="os.version" value="11.1"/>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="Temurin-11.0.12+7"/>
<property name="localRepository" value="/Users/imron/.m2/repository"/>
<property name="java.vendor.url.bug" value="https://github.com/adoptium/adoptium-support/issues"/>
<property name="java.io.tmpdir" value="/var/folders/q8/1t6qjhh97rnbw4mjxv9d4nv40000gr/T/"/>
<property name="java.version" value="11.0.12"/>
<property name="user.dir" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem"/>
<property name="os.arch" value="x86_64"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="java.awt.printerjob" value="sun.lwawt.macosx.CPrinterJob"/>
<property name="sun.os.patch.level" value="unknown"/>
<property name="java.library.path" value="/Users/imron/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:."/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.vendor" value="Eclipse Foundation"/>
<property name="java.vm.version" value="11.0.12+7"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="java.class.version" value="55.0"/>
</properties>
<testcase name="testExampleClass" classname="hs.fulda.de.ci.exam.project.ExampleClassTest" time="0.018"/>
</testsuite>

69
target/surefire-reports/TEST-hs.fulda.de.ci.exam.project.FlightTest.xml

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="hs.fulda.de.ci.exam.project.FlightTest" time="0.081" tests="8" errors="0" skipped="0" failures="0">
<properties>
<property name="gopherProxySet" value="false"/>
<property name="awt.toolkit" value="sun.lwawt.macosx.LWCToolkit"/>
<property name="java.specification.version" value="11"/>
<property name="sun.cpu.isalist" value=""/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.class.path" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/test-classes:/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/classes:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar:/Users/imron/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar:/Users/imron/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar:/Users/imron/.m2/repository/org/assertj/assertj-core/3.21.0/assertj-core-3.21.0.jar:/Users/imron/.m2/repository/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy/1.12.1/byte-buddy-1.12.1.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.1/byte-buddy-agent-1.12.1.jar:/Users/imron/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/imron/.m2/repository/org/mockito/mockito-junit-jupiter/4.1.0/mockito-junit-jupiter-4.1.0.jar:/Users/imron/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar:"/>
<property name="java.vm.vendor" value="Eclipse Foundation"/>
<property name="sun.arch.data.model" value="64"/>
<property name="java.vendor.url" value="https://adoptium.net/"/>
<property name="user.timezone" value=""/>
<property name="java.vm.specification.version" value="11"/>
<property name="os.name" value="Mac OS X"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="GB"/>
<property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home/lib"/>
<property name="sun.java.command" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire/surefirebooter2204197978634362627.jar /Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire 2022-01-30T21-31-27_696-jvmRun1 surefire5553060618833826792tmp surefire_07801071289263107391tmp"/>
<property name="jdk.debug" value="release"/>
<property name="surefire.test.class.path" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/test-classes:/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/classes:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar:/Users/imron/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar:/Users/imron/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar:/Users/imron/.m2/repository/org/assertj/assertj-core/3.21.0/assertj-core-3.21.0.jar:/Users/imron/.m2/repository/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy/1.12.1/byte-buddy-1.12.1.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.1/byte-buddy-agent-1.12.1.jar:/Users/imron/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/imron/.m2/repository/org/mockito/mockito-junit-jupiter/4.1.0/mockito-junit-jupiter-4.1.0.jar:/Users/imron/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar:"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.home" value="/Users/imron"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2021-07-20"/>
<property name="java.home" value="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home"/>
<property name="file.separator" value="/"/>
<property name="basedir" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.awt.graphicsenv" value="sun.awt.CGraphicsEnvironment"/>
<property name="surefire.real.class.path" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire/surefirebooter2204197978634362627.jar"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="java.runtime.version" value="11.0.12+7"/>
<property name="user.name" value="imron"/>
<property name="path.separator" value=":"/>
<property name="os.version" value="11.1"/>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="Temurin-11.0.12+7"/>
<property name="localRepository" value="/Users/imron/.m2/repository"/>
<property name="java.vendor.url.bug" value="https://github.com/adoptium/adoptium-support/issues"/>
<property name="java.io.tmpdir" value="/var/folders/q8/1t6qjhh97rnbw4mjxv9d4nv40000gr/T/"/>
<property name="java.version" value="11.0.12"/>
<property name="user.dir" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem"/>
<property name="os.arch" value="x86_64"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="java.awt.printerjob" value="sun.lwawt.macosx.CPrinterJob"/>
<property name="sun.os.patch.level" value="unknown"/>
<property name="java.library.path" value="/Users/imron/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:."/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.vendor" value="Eclipse Foundation"/>
<property name="java.vm.version" value="11.0.12+7"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="java.class.version" value="55.0"/>
</properties>
<testcase name="getInstances_no_instance_should_be_equal" classname="hs.fulda.de.ci.exam.project.FlightTest" time="0.066"/>
<testcase name="cancel" classname="hs.fulda.de.ci.exam.project.FlightTest" time="0"/>
<testcase name="getDeparture" classname="hs.fulda.de.ci.exam.project.FlightTest" time="0.001"/>
<testcase name="getFlightNumber" classname="hs.fulda.de.ci.exam.project.FlightTest" time="0.004"/>
<testcase name="getDurationInMinutes" classname="hs.fulda.de.ci.exam.project.FlightTest" time="0.001"/>
<testcase name="getArrival" classname="hs.fulda.de.ci.exam.project.FlightTest" time="0"/>
<testcase name="getInstances_not_empty_list_should_be_equal" classname="hs.fulda.de.ci.exam.project.FlightTest" time="0"/>
<testcase name="addFlightSchedule" classname="hs.fulda.de.ci.exam.project.FlightTest" time="0.001"/>
</testsuite>

65
target/surefire-reports/TEST-hs.fulda.de.ci.exam.project.PersonTest.xml

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="hs.fulda.de.ci.exam.project.PersonTest" time="0" tests="4" errors="0" skipped="0" failures="0">
<properties>
<property name="gopherProxySet" value="false"/>
<property name="awt.toolkit" value="sun.lwawt.macosx.LWCToolkit"/>
<property name="java.specification.version" value="11"/>
<property name="sun.cpu.isalist" value=""/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.class.path" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/test-classes:/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/classes:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar:/Users/imron/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar:/Users/imron/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar:/Users/imron/.m2/repository/org/assertj/assertj-core/3.21.0/assertj-core-3.21.0.jar:/Users/imron/.m2/repository/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy/1.12.1/byte-buddy-1.12.1.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.1/byte-buddy-agent-1.12.1.jar:/Users/imron/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/imron/.m2/repository/org/mockito/mockito-junit-jupiter/4.1.0/mockito-junit-jupiter-4.1.0.jar:/Users/imron/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar:"/>
<property name="java.vm.vendor" value="Eclipse Foundation"/>
<property name="sun.arch.data.model" value="64"/>
<property name="java.vendor.url" value="https://adoptium.net/"/>
<property name="user.timezone" value=""/>
<property name="java.vm.specification.version" value="11"/>
<property name="os.name" value="Mac OS X"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="GB"/>
<property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home/lib"/>
<property name="sun.java.command" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire/surefirebooter2204197978634362627.jar /Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire 2022-01-30T21-31-27_696-jvmRun1 surefire5553060618833826792tmp surefire_07801071289263107391tmp"/>
<property name="jdk.debug" value="release"/>
<property name="surefire.test.class.path" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/test-classes:/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/classes:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar:/Users/imron/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar:/Users/imron/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar:/Users/imron/.m2/repository/org/assertj/assertj-core/3.21.0/assertj-core-3.21.0.jar:/Users/imron/.m2/repository/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy/1.12.1/byte-buddy-1.12.1.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.1/byte-buddy-agent-1.12.1.jar:/Users/imron/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/imron/.m2/repository/org/mockito/mockito-junit-jupiter/4.1.0/mockito-junit-jupiter-4.1.0.jar:/Users/imron/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar:"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.home" value="/Users/imron"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2021-07-20"/>
<property name="java.home" value="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home"/>
<property name="file.separator" value="/"/>
<property name="basedir" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.awt.graphicsenv" value="sun.awt.CGraphicsEnvironment"/>
<property name="surefire.real.class.path" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire/surefirebooter2204197978634362627.jar"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="java.runtime.version" value="11.0.12+7"/>
<property name="user.name" value="imron"/>
<property name="path.separator" value=":"/>
<property name="os.version" value="11.1"/>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="Temurin-11.0.12+7"/>
<property name="localRepository" value="/Users/imron/.m2/repository"/>
<property name="java.vendor.url.bug" value="https://github.com/adoptium/adoptium-support/issues"/>
<property name="java.io.tmpdir" value="/var/folders/q8/1t6qjhh97rnbw4mjxv9d4nv40000gr/T/"/>
<property name="java.version" value="11.0.12"/>
<property name="user.dir" value="/Users/imron/Library/CloudStorage/OneDrive-lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem"/>
<property name="os.arch" value="x86_64"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="java.awt.printerjob" value="sun.lwawt.macosx.CPrinterJob"/>
<property name="sun.os.patch.level" value="unknown"/>
<property name="java.library.path" value="/Users/imron/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:."/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.vendor" value="Eclipse Foundation"/>
<property name="java.vm.version" value="11.0.12+7"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="java.class.version" value="55.0"/>
</properties>
<testcase name="test_getName" classname="hs.fulda.de.ci.exam.project.PersonTest" time="0"/>
<testcase name="test_getAddress" classname="hs.fulda.de.ci.exam.project.PersonTest" time="0"/>
<testcase name="test_getEmail" classname="hs.fulda.de.ci.exam.project.PersonTest" time="0"/>
<testcase name="test_getPhone" classname="hs.fulda.de.ci.exam.project.PersonTest" time="0"/>
</testsuite>

62
target/surefire-reports/TEST-hs.fulda.de.ci.exam.project.TestExampleClass.xml

@ -1,62 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://maven.apache.org/surefire/maven-surefire-plugin/xsd/surefire-test-report.xsd" name="hs.fulda.de.ci.exam.project.TestExampleClass" time="0.023" tests="1" errors="0" skipped="0" failures="0">
<properties>
<property name="gopherProxySet" value="false"/>
<property name="awt.toolkit" value="sun.lwawt.macosx.LWCToolkit"/>
<property name="java.specification.version" value="11"/>
<property name="sun.cpu.isalist" value=""/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="java.class.path" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/test-classes:/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/classes:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar:/Users/imron/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar:/Users/imron/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar:/Users/imron/.m2/repository/org/assertj/assertj-core/3.21.0/assertj-core-3.21.0.jar:/Users/imron/.m2/repository/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy/1.12.1/byte-buddy-1.12.1.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.1/byte-buddy-agent-1.12.1.jar:/Users/imron/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/imron/.m2/repository/org/mockito/mockito-junit-jupiter/4.1.0/mockito-junit-jupiter-4.1.0.jar:"/>
<property name="java.vm.vendor" value="Eclipse Foundation"/>
<property name="sun.arch.data.model" value="64"/>
<property name="java.vendor.url" value="https://adoptium.net/"/>
<property name="user.timezone" value=""/>
<property name="java.vm.specification.version" value="11"/>
<property name="os.name" value="Mac OS X"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="user.country" value="GB"/>
<property name="sun.boot.library.path" value="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home/lib"/>
<property name="sun.java.command" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire/surefirebooter2136516617371735560.jar /Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire 2022-01-24T12-26-38_824-jvmRun1 surefire13539754851733994117tmp surefire_015090886908496297244tmp"/>
<property name="jdk.debug" value="release"/>
<property name="surefire.test.class.path" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/test-classes:/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/classes:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.8.1/junit-jupiter-engine-5.8.1.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-engine/1.8.1/junit-platform-engine-1.8.1.jar:/Users/imron/.m2/repository/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/imron/.m2/repository/org/junit/platform/junit-platform-commons/1.8.1/junit-platform-commons-1.8.1.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.8.1/junit-jupiter-api-5.8.1.jar:/Users/imron/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/Users/imron/.m2/repository/org/junit/jupiter/junit-jupiter-params/5.8.1/junit-jupiter-params-5.8.1.jar:/Users/imron/.m2/repository/org/assertj/assertj-core/3.21.0/assertj-core-3.21.0.jar:/Users/imron/.m2/repository/org/mockito/mockito-core/4.1.0/mockito-core-4.1.0.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy/1.12.1/byte-buddy-1.12.1.jar:/Users/imron/.m2/repository/net/bytebuddy/byte-buddy-agent/1.12.1/byte-buddy-agent-1.12.1.jar:/Users/imron/.m2/repository/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/imron/.m2/repository/org/mockito/mockito-junit-jupiter/4.1.0/mockito-junit-jupiter-4.1.0.jar:"/>
<property name="sun.cpu.endian" value="little"/>
<property name="user.home" value="/Users/imron"/>
<property name="user.language" value="en"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.version.date" value="2021-07-20"/>
<property name="java.home" value="/Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home"/>
<property name="file.separator" value="/"/>
<property name="basedir" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem"/>
<property name="java.vm.compressedOopsMode" value="Zero based"/>
<property name="line.separator" value="&#10;"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
<property name="java.awt.graphicsenv" value="sun.awt.CGraphicsEnvironment"/>
<property name="surefire.real.class.path" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem/target/surefire/surefirebooter2136516617371735560.jar"/>
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
<property name="java.runtime.version" value="11.0.12+7"/>
<property name="user.name" value="imron"/>
<property name="path.separator" value=":"/>
<property name="os.version" value="11.1"/>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="file.encoding" value="UTF-8"/>
<property name="java.vm.name" value="OpenJDK 64-Bit Server VM"/>
<property name="java.vendor.version" value="Temurin-11.0.12+7"/>
<property name="localRepository" value="/Users/imron/.m2/repository"/>
<property name="java.vendor.url.bug" value="https://github.com/adoptium/adoptium-support/issues"/>
<property name="java.io.tmpdir" value="/var/folders/q8/1t6qjhh97rnbw4mjxv9d4nv40000gr/T/"/>
<property name="java.version" value="11.0.12"/>
<property name="user.dir" value="/Users/imron/OneDrive - lt.hs-fulda.de/Desktop/Semester_7_HSF/CI/AirlineManagementSystem"/>
<property name="os.arch" value="x86_64"/>
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
<property name="java.awt.printerjob" value="sun.lwawt.macosx.CPrinterJob"/>
<property name="sun.os.patch.level" value="unknown"/>
<property name="java.library.path" value="/Users/imron/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:."/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.vendor" value="Eclipse Foundation"/>
<property name="java.vm.version" value="11.0.12+7"/>
<property name="sun.io.unicode.encoding" value="UnicodeBig"/>
<property name="java.class.version" value="55.0"/>
</properties>
<testcase name="testExampleClass" classname="hs.fulda.de.ci.exam.project.TestExampleClass" time="0.017"/>
</testsuite>

4
target/surefire-reports/TestExample.txt → target/surefire-reports/hs.fulda.de.ci.exam.project.AddressTest.txt

@ -1,4 +1,4 @@
-------------------------------------------------------------------------------
Test set: TestExample
Test set: hs.fulda.de.ci.exam.project.AddressTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in TestExample
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.013 s - in hs.fulda.de.ci.exam.project.AddressTest

4
target/surefire-reports/hs.fulda.de.ci.exam.project.AirlineTest.txt

@ -0,0 +1,4 @@
-------------------------------------------------------------------------------
Test set: hs.fulda.de.ci.exam.project.AirlineTest
-------------------------------------------------------------------------------
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.096 s - in hs.fulda.de.ci.exam.project.AirlineTest

4
target/surefire-reports/hs.fulda.de.ci.exam.project.AirportTest.txt

@ -0,0 +1,4 @@
-------------------------------------------------------------------------------
Test set: hs.fulda.de.ci.exam.project.AirportTest
-------------------------------------------------------------------------------
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.253 s - in hs.fulda.de.ci.exam.project.AirportTest

4
target/surefire-reports/hs.fulda.de.ci.exam.project.ExampleClassTest.txt

@ -1,4 +0,0 @@
-------------------------------------------------------------------------------
Test set: hs.fulda.de.ci.exam.project.ExampleClassTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.022 s - in hs.fulda.de.ci.exam.project.ExampleClassTest

4
target/surefire-reports/hs.fulda.de.ci.exam.project.FlightTest.txt

@ -0,0 +1,4 @@
-------------------------------------------------------------------------------
Test set: hs.fulda.de.ci.exam.project.FlightTest
-------------------------------------------------------------------------------
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.081 s - in hs.fulda.de.ci.exam.project.FlightTest

4
target/surefire-reports/hs.fulda.de.ci.exam.project.PersonTest.txt

@ -0,0 +1,4 @@
-------------------------------------------------------------------------------
Test set: hs.fulda.de.ci.exam.project.PersonTest
-------------------------------------------------------------------------------
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in hs.fulda.de.ci.exam.project.PersonTest

4
target/surefire-reports/hs.fulda.de.ci.exam.project.TestExampleClass.txt

@ -1,4 +0,0 @@
-------------------------------------------------------------------------------
Test set: hs.fulda.de.ci.exam.project.TestExampleClass
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.023 s - in hs.fulda.de.ci.exam.project.TestExampleClass

BIN
target/test-classes/TestExample.class

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

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

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

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

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

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

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

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

Loading…
Cancel
Save