华东交通大学实验三单元测试Word格式文档下载.docx

上传人:b****1 文档编号:13165394 上传时间:2022-10-07 格式:DOCX 页数:5 大小:1.15MB
下载 相关 举报
华东交通大学实验三单元测试Word格式文档下载.docx_第1页
第1页 / 共5页
华东交通大学实验三单元测试Word格式文档下载.docx_第2页
第2页 / 共5页
华东交通大学实验三单元测试Word格式文档下载.docx_第3页
第3页 / 共5页
华东交通大学实验三单元测试Word格式文档下载.docx_第4页
第4页 / 共5页
华东交通大学实验三单元测试Word格式文档下载.docx_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

华东交通大学实验三单元测试Word格式文档下载.docx

《华东交通大学实验三单元测试Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《华东交通大学实验三单元测试Word格式文档下载.docx(5页珍藏版)》请在冰豆网上搜索。

华东交通大学实验三单元测试Word格式文档下载.docx

publicTriangletriangle;

//初始化

protectedvoidsetUp(){

triangle=newTriangle(10,2,9);

}

publicstaticTestsuite(){

return(Test)newTestSuite(TriangleTest.class);

//函数isTriangle()的测试用例

publicvoidtestIsTriangle(){

assertTrue(triangle.isTriangle(triangle));

//函数isType()的测试用例

publicvoidtestIsType()

{

assertEquals("

这次测试"

triangle.isType(triangle),"

不等边三角形"

);

//执行测试

publicstaticvoidmain(String[]args){

//文本方式

junit.textui.TestRunner.run(suite());

}

实验结果:

testIsType(com.huangcai.TriangleTest)

junit.framework.ComparisonFailure:

这次测试expected:

<

[]等边三角形>

butwas:

[不]等边三角形>

这次测试expected:

[]>

butwas:

[不等边三角形]>

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 初中教育 > 初中作文

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1