Exemplo n.º 1
0
 @Test
 public void testGetById() {
   int id = 1;
   User user = service.getById(id);
   assertNotNull(user);
   assertEquals(user.getId(), id);
 }
Exemplo n.º 2
0
 @Test
 public void testRegister() throws MovieException {
   User user = TestUtils.createTestUser(NAME, "pass123", new Date(), NAME + "@email.com");
   int accountId = accountService.create(user.getAccount());
   user.getAccount().setId(accountId);
   service.register(user);
   user = service.getUserByName(NAME);
   assertTrue(user.getId() > 0);
 }