fertige Tests für Payment und Transfer
Kleine Anpassungen im Exception Handling der Konstruktoren
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import bank.*;
|
||||
import bank.exceptions.IOException;
|
||||
import bank.exceptions.TransactionAttributeException;
|
||||
import bank.exceptions.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -251,7 +250,7 @@ public class Main {
|
||||
|
||||
// ------------------------ MAIN ------------------------
|
||||
|
||||
public static void main(String[] args) throws TransactionAttributeException, IOException, java.io.IOException {
|
||||
public static void main(String[] args) throws TransactionAttributeException, IOException, java.io.IOException, TransactionAlreadyExistException, AccountAlreadyExistsException, AccountDoesNotExistException {
|
||||
String person1 = "Max Mustermann";
|
||||
String person2 = "Maria Musterfrau";
|
||||
String person3 = "Tom Mustermann";
|
||||
@@ -259,8 +258,9 @@ public class Main {
|
||||
|
||||
// ------------------------ Transactions ------------------------
|
||||
|
||||
/*
|
||||
|
||||
Payment p1 = new Payment("01.01.24", 10, "Verwendungszweck P1");
|
||||
/*
|
||||
Payment p2 = new Payment("01.01.24", 10, "Verwendungszweck P2", 0, 0);
|
||||
Payment p3 = new Payment("01.01.24", -10, "Verwendungszweck P3", 0.5, 0);
|
||||
Payment p4 = new Payment("01.01.24", -10, "Verwendungszweck P4", 0, 0.25);
|
||||
@@ -301,13 +301,14 @@ public class Main {
|
||||
|
||||
System.out.println("\n------------------------ Bank");
|
||||
PrivateBank bank = new PrivateBank("Sparkasse", 0.5, 0.25,"accountdata");
|
||||
PrivateBankAlt bankAlt = new PrivateBankAlt("SparkasseAlt", 0.5, 0.25);
|
||||
PrivateBank bank1 = new PrivateBank("Commerzbank", 0.5, 0.25,"accountdata");
|
||||
|
||||
// ------------------------ Bank: Adding Accounts
|
||||
|
||||
bank.readAccounts();
|
||||
|
||||
bank.writeAccount("Max");
|
||||
bank.addTransaction("Max",p1);
|
||||
bank.writeAccount("Max");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user