MCPcopy Create free account
hub / github.com/castello/spring_basic / write

Method write

ch4/CommentServiceImplTest.java:49–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47 }
48
49 @Test
50 public void write() throws Exception {
51 boardDao.deleteAll();
52
53 BoardDto boardDto = new BoardDto("hello", "hello", "asdf");
54 assertTrue(boardDao.insert(boardDto) == 1);
55 Integer bno = boardDao.selectAll().get(0).getBno();
56 System.out.println("bno = " + bno);
57
58 commentDao.deleteAll(bno);
59 CommentDto commentDto = new CommentDto(bno,0,"hi","qwer");
60
61 assertTrue(boardDao.select(bno).getComment_cnt() == 0);
62 assertTrue(commentService.write(commentDto)==1);
63
64 Integer cno = commentDao.selectAll(bno).get(0).getCno();
65 assertTrue(boardDao.select(bno).getComment_cnt() == 1);
66 }
67}

Callers

nothing calls this directly

Calls 8

getComment_cntMethod · 0.80
getCnoMethod · 0.80
deleteAllMethod · 0.65
insertMethod · 0.65
selectAllMethod · 0.65
selectMethod · 0.65
writeMethod · 0.65
getBnoMethod · 0.45

Tested by

no test coverage detected