import java.util.List;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import cn.sxt.vo.exam.Question;
import cn.sxt.vo.student.Cluss;
import cn.sxt.vo.student.Student;
import cn.sxt.vo.subject.Subject;
public class ExamServiceTest {
@Test
public void testExam(){
ApplicationContext ac = new ClassPathXmlApplicationContext("beans.xml");
ExamService es = ac.getBean(ExamService.class);
Subject subject = new Subject();
subject.setId(1);
Student student = new Student();
student.setId(1);
Cluss cluss = new Cluss();
cluss.setId(1);
student.setCluss(cluss);
List<Question> list = es.exam(student, subject);
System.out.println(list.size());
}
}