示例#1
0
 @Test(expected = NoCardInsertedException.class)
 public void testGetCardFromATMIfCardIsNotInserted()
     throws NotEnoughMoneyInATMException, NotEnoughMoneyInAccountException,
         NoCardInsertedException {
   System.out.println("getCardFromATMIfCardIsNotInserted");
   ATM atmTest = new ATM(1000.0);
   atmTest.getCardFromATM();
 }
示例#2
0
 @Test(expected = NoCardInsertedException.class)
 public void testGetCardFromATMMoreThanOneTime() throws NoCardInsertedException {
   System.out.println("getCardFromATMMoreThanOneTime");
   ATM atmTest = new ATM(1000.0);
   Card mockCard = mock(Card.class);
   atmTest.insertCard(mockCard);
   atmTest.getCardFromATM();
   atmTest.getCardFromATM();
 }