package com.chetian;
import com.chetian.controller.StrController;
import com.chetian.service.StrService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@RunWith(SpringJUnit4ClassRunner.class)
@WebAppConfiguration
@ContextConfiguration(locations = {"classpath:spring-mvc.xml"})
public class testStrController {
@Autowired
private StrService strService;
@Test
public void testJunitDemo(){
assertEquals(1,1);
}
@Test
public void testJoinStr() {
String result = strService.joinStr("zhang","san");
System.out.println(result);
assertNotNull(result);
}
@Test
public void getMsg() {
StrController strWork = new StrController();
String result = strWork.returnMsg("tks");
System.out.println(result);
assertNotNull(result);
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
springmvc项目搭建并实现Junit单元测试
共48个文件
jar:16个
xml:10个
class:7个
需积分: 9 0 下载量 66 浏览量
2022-09-09
09:36:49
上传
评论
收藏 6.58MB ZIP 举报
温馨提示
springmvc项目搭建并实现Junit单元测试源码
资源详情
资源评论
资源推荐
收起资源包目录
springmvc.zip (48个子文件)
springmvc
pom.xml 2KB
target
test-classes
com
chetian
testStrController.class 2KB
generated-test-sources
test-annotations
classes
spring-mvc.xml 1KB
log4j.properties 2KB
com
chetian
controller
MainformController.class 611B
StrController.class 2KB
service
StrService.class 720B
generated-sources
annotations
springmvc-1.0-SNAPSHOT
META-INF
MANIFEST.MF 93B
WEB-INF
web.xml 2KB
views
hello.jsp 324B
index.jsp 331B
classes
spring-mvc.xml 1KB
log4j.properties 2KB
com
chetian
controlller
controller
MainformController.class 611B
StrController.class 2KB
service
StrService.class 720B
lib
junit-4.12.jar 308KB
spring-tx-4.3.7.RELEASE.jar 261KB
spring-webmvc-4.3.7.RELEASE.jar 894KB
spring-context-4.3.7.RELEASE.jar 1.09MB
jsp-api-2.2.1-b03.jar 49KB
spring-core-4.3.7.RELEASE.jar 1.07MB
spring-aop-4.3.7.RELEASE.jar 371KB
hamcrest-core-1.3.jar 44KB
spring-test-4.3.7.RELEASE.jar 585KB
spring-expression-4.3.7.RELEASE.jar 257KB
spring-web-4.3.7.RELEASE.jar 799KB
jstl-1.2.jar 405KB
commons-logging-1.2.jar 60KB
spring-beans-4.3.7.RELEASE.jar 745KB
log4j-1.2.17.jar 478KB
javax.servlet-api-3.1.0.jar 94KB
index.html 152B
src
test
java
com
chetian
testStrController.java 1KB
main
webapp
WEB-INF
web.xml 2KB
views
hello.jsp 324B
index.jsp 331B
index.html 152B
resources
spring-mvc.xml 1KB
log4j.properties 2KB
java
com
chetian
controller
StrController.java 806B
MainformController.java 301B
service
StrService.java 207B
.idea
uiDesigner.xml 9KB
misc.xml 640B
compiler.xml 530B
workspace.xml 36KB
springmvc.iml 80B
共 48 条
- 1
devinshou
- 粉丝: 6
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 电子万年历软件仿真(经过多次修改,保证正确性)
- Unity XR 手势射击控制脚本(适用于任何可手势识别的设备)
- 机械设计全自动电表(NB和IC卡表)控制和上壳装配线sw16可编辑非常好的设计图纸100%好用.zip
- 基于matlab的EAN-13条形码识别系统GUI界面.zip代码53
- matlab基于bp神经网络交通信号标志识别GUI界面13个标志.zip代码54
- 电子万年历答辩实物展示视频mp4格式
- 基于python实现的程序,包括哈希感知算法cvHash,图像切割cvsplit,固定目标检测cvRec(附文档ppt)等
- 计算0-10000之间所有偶数的和
- multiled.zip
- 基于php实现的哈希算法的人脸检索
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0