saldo versuch

main
informatikperson 2022-10-25 15:59:39 +02:00
parent 74e6b5b5b3
commit f1ced6fda4
3 changed files with 11 additions and 0 deletions

View File

@ -39,5 +39,16 @@ class BanksystemTest {
assertEquals(bs2.getKontostand(kontonummer), 50); assertEquals(bs2.getKontostand(kontonummer), 50);
} }
@Test
void testSaldo() throws Exception {
Konto k = new Konto("Meier",1);
Konto k2 = new Konto("franz",2);
Banksystem bs = new Banksystem("TEstene");
k.einzahlen(500, null, null, "Meier");
k.einzahlen(200, null, null, "Meier");
k.einzahlen(300, null, null, "Meier");
assertEquals(500, k.getSaldo(2));
assertEquals(700, k.getSaldo(3));
}
} }