@Test public void testSave() { User user = UserBuilder.userBuilder(1) .username("test") .email("*****@*****.**") .password("test") .build(); user = userManager.get(userManager.save(user, true)); Assert.assertNotNull(user); Assert.assertNotNull(user.getUsername()); Assert.assertEquals(new Integer(0), user.getUserLoginStatistic().getLoginOk()); Assert.assertNotNull(user.getRoles()); Assert.assertTrue(user.getRoles().size() > 0); }
@Test public void testProperty() { User user = userManager.filter("username", "admin"); Assert.assertNotNull(user); Assert.assertNotNull(user.getUsername()); }
@Test public void testGet() { User user = userManager.get(1); Assert.assertNotNull(user); Assert.assertNotNull(user.getUsername()); }