Exemplo n.º 1
0
  // @Test
  public void testDeleteDiary() throws Exception {

    Diary diary = new Diary();

    diary.setdNo(100001);
    System.out.println("delete diary : " + diaryService.deleteDiary(diary.getdNo()));
  }
Exemplo n.º 2
0
  // @Test
  public void testUpdateDCode() throws Exception {

    Diary diary = new Diary();
    diary.setdNo(100002);
    diary.setdCode("open");

    diaryService.updateDCode(diary);
    System.out.println("updateDCode : " + diaryService.getDiary(100002));
  }
Exemplo n.º 3
0
  // @Test
  public void testAddDiary() throws Exception {
    Diary diary = new Diary();
    Baby baby = new Baby();
    User user = new User();

    baby.setbNo(100010);
    user.setuNo(100015);

    diary.setdCode("1");
    diary.setdContent(
        "있는힘껏 배에다 힘줘 너의 손가락은 down down down down down 있는힘껏 악써 우리가 가루 가루 가루 가루 가루가 될때 까지");
    diary.setdPic("img/diary/pic1.jpg");
    diary.setdTag("#제목1, #다이어리");
    diary.setuPic("img/user/pic1.jpg");
    diary.setDiaryBaby(baby);
    diary.setDiaryUser(user);

    diaryService.insertDiary(diary);
  }
Exemplo n.º 4
0
  // @Test
  public void testUpdateDiary() throws Exception {
    Diary diary = new Diary();
    Baby baby = new Baby();
    User user = new User();

    baby.setbNo(100010);
    user.setuNo(100015);

    diary.setdCode("1");
    diary.setdContent(
        "있는힘껏 배에다 힘줘 너의 손가락은 down down down down down 있는힘껏 악써 우리가 가루 가루 가루 가루 가루가 될때 까지");
    diary.setdPic("img/diary/pic1.jpg");
    diary.setdTag("#제목1, #다이어리");
    diary.setuPic("img/user/pic1.jpg");
    diary.setDiaryBaby(baby);
    diary.setDiaryUser(user);

    diaryService.insertDiary(diary);

    diary.setdNo(100000);
    diary.setdPic("img/diary/pic2.jpg");
    diary.setdTag("#제목2, #다이어리");
    diary.setuPic("img/user/pic2.jpg");
    diaryService.updateDiary(diary);

    System.out.println("Update Diary 후 GetDiary : " + diaryService.getDiary(100000));
  }