Ejemplo n.º 1
0
 @Test
 @DatabaseSetup(DATASET_XML)
 public void testLoginAsTowner() {
   //
   assertFalse(townerService.loginAsTowner("aa", "gggg"));
   assertTrue(townerService.loginAsTowner("*****@*****.**", "1234"));
 }
Ejemplo n.º 2
0
  @Test
  @DatabaseSetup(DATASET_XML)
  public void testRemoveTowner() {
    //
    String email = "*****@*****.**";
    townerService.removeTowner(email);

    assertNull(townerService.findTowner(email));
  }
Ejemplo n.º 3
0
 @Test
 @DatabaseSetup(DATASET_XML)
 public void testFindAllTowner() {
   //
   List<SocialPerson> persons = townerService.findAllTowner();
   assertEquals(3, persons.size());
 }
Ejemplo n.º 4
0
 @Test
 @DatabaseSetup(DATASET_XML)
 public void testFindTowner() {
   //
   SocialPerson towner = townerService.findTowner("*****@*****.**");
   assertEquals("*****@*****.**", towner.getEmail());
 }
Ejemplo n.º 5
0
  @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());
  }
Ejemplo n.º 6
0
  @Test(expected = NamooRuntimeException.class)
  @DatabaseSetup(DATASET_XML)
  public void testRegistTownerWithException() {
    //
    String name = "정효진";
    String email = "*****@*****.**";
    String password = "******";

    townerService.registTowner(name, email, password);
  }
Ejemplo n.º 7
0
 @Test(expected = NamooRuntimeException.class)
 @DatabaseSetup(DATASET_XML)
 public void testRemoveTownerWithException() {
   // 커뮤니티의 회원으로 가입된 경우 삭제하지 못한다.
   townerService.removeTowner("*****@*****.**");
 }