TA的每日心情 | 擦汗 昨天 09:07 |
---|
签到天数: 527 天 连续签到: 4 天 [LV.9]测试副司令
|
1测试积点
service 层怎么测试?用junit
- <p>@Service
- public class StudentServiceImpl implements StudentService{
-
- @Autowired
- private StudentDao studentDao;
-
- public List<Student> findAll() {
-
- return studentDao.findAll();
- }</p><p> public void insertStudent(Student student) {
- studentDao.insertStudent(student);
- }
-
- public Student findById(String id) {
- return studentDao.findById(id);
- }
-
- public void delete(String id) {
- studentDao.delete(id);
- }
-
- public void edit(String id, Student student)throws StudentException {
- studentDao.edit(id, student);
- }
-
- }</p>
复制代码
|
|