|
@ -8,32 +8,28 @@ class MyTest { |
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
|
public void testSetBudgetView() { |
|
|
public void testSetBudgetView() { |
|
|
assertEquals(MeinGui.budget + " €", MeinGui.setBudgetView()); |
|
|
|
|
|
assertNotEquals(MeinGui.budget + " ", MeinGui.setBudgetView()); |
|
|
|
|
|
assertNotEquals(MeinGui.budget + "€ ", MeinGui.setBudgetView()); |
|
|
|
|
|
assertNotEquals(MeinGui.budget + " € ", MeinGui.setBudgetView()); |
|
|
|
|
|
assertNotEquals(MeinGui.budget + " ", MeinGui.setBudgetView()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
|
public void testSetExpensesView() { |
|
|
|
|
|
assertEquals(MeinGui.expenses - MeinGui.budget + " €", MeinGui.setExpensesView()); |
|
|
|
|
|
assertNotEquals(MeinGui.expenses - MeinGui.budget, MeinGui.setExpensesView()); |
|
|
|
|
|
assertNotEquals(MeinGui.expenses - MeinGui.budget + "€ " , MeinGui.setExpensesView()); |
|
|
|
|
|
assertNotEquals(MeinGui.expenses - MeinGui.budget + " € " , MeinGui.setExpensesView()); |
|
|
|
|
|
assertNotEquals(MeinGui.expenses - MeinGui.budget + "", MeinGui.setExpensesView()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MeinGui.budget = 2000.; |
|
|
|
|
|
|
|
|
|
|
|
assertEquals(2000.0 + " €", MeinGui.setBudgetView()); |
|
|
|
|
|
assertNotEquals(2000 + " €", MeinGui.setBudgetView()); |
|
|
|
|
|
assertNotEquals(2000.0 + "€ ", MeinGui.setBudgetView()); |
|
|
|
|
|
assertNotEquals(2000 + " €", MeinGui.setBudgetView()); |
|
|
|
|
|
assertNotEquals(2000.0 + "€", MeinGui.setBudgetView()); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
@Test |
|
|
public void testSetBalanceView() { |
|
|
public void testSetBalanceView() { |
|
|
assertEquals(MeinGui.balance + " €", MeinGui.setExpensesView()); |
|
|
|
|
|
assertNotEquals(MeinGui.balance, MeinGui.setExpensesView()); |
|
|
|
|
|
assertNotEquals(MeinGui.balance + "€ " , MeinGui.setExpensesView()); |
|
|
|
|
|
assertNotEquals(MeinGui.balance+ " € " , MeinGui.setExpensesView()); |
|
|
|
|
|
assertNotEquals(MeinGui.balance*2 + " € ", MeinGui.setExpensesView()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MeinGui.budget = 2000.; |
|
|
|
|
|
MeinGui.expenses = 405.; |
|
|
|
|
|
|
|
|
|
|
|
assertEquals(1595.0 + " €", MeinGui.setBalanceView()); |
|
|
|
|
|
assertNotEquals(1595 + " €", MeinGui.setBalanceView()); |
|
|
|
|
|
assertNotEquals(1595 + "€ ", MeinGui.setBalanceView()); |
|
|
|
|
|
assertNotEquals(1595 + "€", MeinGui.setBalanceView()); |
|
|
|
|
|
assertNotEquals(null, MeinGui.setBalanceView()); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |