Added RestServer + Added Create User (/users)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import at.reisinger.Coins;
|
||||
import at.reisinger.NegativAmountException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
@@ -17,9 +19,9 @@ public class CoinsTest {
|
||||
try {
|
||||
Coins coin = new Coins(10);
|
||||
coin.addCoin(-10);
|
||||
fail("Erwartet NegativAmountException - addCoin");
|
||||
fail("Erwartet at.reisinger.NegativAmountException - addCoin");
|
||||
}catch (NegativAmountException negativAmountException) {
|
||||
assertTrue(negativAmountException.getMessage().equals("Es kann kein negativer amount an Coins hinzugefügt werden"));
|
||||
assertTrue(negativAmountException.getMessage().equals("Es kann kein negativer amount an at.reisinger.Coins hinzugefügt werden"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,9 +30,9 @@ public class CoinsTest {
|
||||
try {
|
||||
Coins coin = new Coins(10);
|
||||
coin.removeCoin(-10);
|
||||
fail("Erwartet NegativAmountException - removeCoin");
|
||||
fail("Erwartet at.reisinger.NegativAmountException - removeCoin");
|
||||
}catch (NegativAmountException negativAmountException) {
|
||||
assertTrue(negativAmountException.getMessage().equals("Es kann kein negativer amount an Coins hinzugefügt werden"));
|
||||
assertTrue(negativAmountException.getMessage().equals("Es kann kein negativer amount an at.reisinger.Coins hinzugefügt werden"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user