测试时 使用sping 的上下文 调用 ssh中的方法
来源:互联网 发布:传统出版网络出版 编辑:程序博客网 时间:2024/05/16 01:44
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());
}
}
0 0
- 测试时 使用sping 的上下文 调用 ssh中的方法
- sping管理hibernate下使用junit测试方法
- 谈谈Javascript中的异步调用的上下文
- 获取sping上下文对象(ApplicationContext)的几种方式
- Php中的调用上下文和解析上下文
- 使用ASP.NET AJAX异步调用Web Service和页面中的类方法(3):保持用户上下文
- Sping中的lookUp注入方法简单介绍
- 如何使用单元测试 测试WEB组件方法中的含有Session、Cookie等HttpContext功能调用的方法?
- 使用junit测试ssh中的dao
- SSH(Sping,Struts2,Hibernate)和SSM(Sping,SpringMVC,MyBatis)的比较
- Java Web开发中Sping的总结和SSH配置
- Java Web开发中Sping的总结和SSH配置
- Java Web开发中Sping的总结和SSH配置
- 调用函数的方式决定了调用的上下文中的this值
- Sping MVC中@MatrixVariable的使用
- sping quartz定时任务的使用
- quartz和sping的集成和使用
- 在Sping Boot logback的使用
- SQL COUNT() 函数
- Android初步,JDK的配置
- hdu3826 打表《借鉴思路》
- OSG for Android新手教程系列(三)——HelloWorld,第一个示例
- 设计模式-简单工场模式
- 测试时 使用sping 的上下文 调用 ssh中的方法
- spring的IOC原理
- CodeForces 569A Music
- 把数组排成最小的数
- Android 解析后台返回为Json数据的简单例子
- hdu3792 打表
- 深入理解Nginx chap 4 配置, error日志和请求上下文
- 关于windows 10 安装
- ping故障检测过程