@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); }
@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); }
@Test public void test() { Abonent abonent = new Abonent(); abonent.setMsisdn("7111111111"); abonent.setPassword("23423423"); abonent.setBalance(0.0); assertEquals(0, service.saveAbonent(abonent)); assertEquals(1, service.saveAbonent(abonent)); }