@Test @DatabaseSetup(DATASET_XML) public void testLoginAsTowner() { // assertFalse(townerService.loginAsTowner("aa", "gggg")); assertTrue(townerService.loginAsTowner("*****@*****.**", "1234")); }
@Test @DatabaseSetup(DATASET_XML) public void testRemoveTowner() { // String email = "*****@*****.**"; townerService.removeTowner(email); assertNull(townerService.findTowner(email)); }
@Test @DatabaseSetup(DATASET_XML) public void testFindAllTowner() { // List<SocialPerson> persons = townerService.findAllTowner(); assertEquals(3, persons.size()); }
@Test @DatabaseSetup(DATASET_XML) public void testFindTowner() { // SocialPerson towner = townerService.findTowner("*****@*****.**"); assertEquals("*****@*****.**", towner.getEmail()); }
@Test @DatabaseSetup(DATASET_XML) public void testRegistTowner() { // String name = "정효진"; String email = "*****@*****.**"; String password = "******"; townerService.registTowner(name, email, password); SocialPerson towner = townerService.findTowner(email); assertEquals(name, towner.getName()); assertEquals(email, towner.getEmail()); assertEquals(password, towner.getPassword()); }
@Test(expected = NamooRuntimeException.class) @DatabaseSetup(DATASET_XML) public void testRegistTownerWithException() { // String name = "정효진"; String email = "*****@*****.**"; String password = "******"; townerService.registTowner(name, email, password); }
@Test(expected = NamooRuntimeException.class) @DatabaseSetup(DATASET_XML) public void testRemoveTownerWithException() { // 커뮤니티의 회원으로 가입된 경우 삭제하지 못한다. townerService.removeTowner("*****@*****.**"); }