コード例 #1
0
 @Test(expected = WrongPasswordException.class)
 public void testGetWrongPassword() {
   Abonent abonent = new Abonent();
   abonent.setMsisdn("7111111112");
   abonent.setPassword("23423423");
   abonent.setBalance(0.0);
   service.saveAbonent(abonent);
   assertEquals(0.0, service.getBalance(abonent.getMsisdn(), "sdfdsfds"), 0.0001);
 }
コード例 #2
0
 @Test
 public void testGetBalance() {
   Abonent abonent = new Abonent();
   abonent.setMsisdn("7111111112");
   abonent.setPassword("23423423");
   abonent.setBalance(0.0);
   service.saveAbonent(abonent);
   assertEquals(0.0, service.getBalance(abonent.getMsisdn(), "23423423"), 0.0001);
 }