import static org.junit.Assert.*;
public class StudentTest {
public void testGetDetails001() throws Exception{
StudentDAO studentDAO = EasyMock.createMock(StudentDAO.class);
Student student = new Student();
student.setRollNo("111");
EasyMock.expect(studentDAO.getStudentDetails(EasyMock.isA(String.class))).andReturn(student);
EasyMock.replay(studentDAO);
StudentCheck studentCheck = new StudentCheck();
studentCheck.setStudDAO(studentDAO);
Student stud = studentCheck.getDetails(rollNo);
assertEquals("111",stud.getRollNo());
Комментариев нет:
Отправить комментарий