根据下面三角形程序,结合白盒测试用例设计技术,在Junit工具中编写对应的单元测试脚本。
package test1;
public class Triangle {
protected long A, B, C = 0;
public Triangle(long A, long B, long C) {
this.A = A;
this.B = B;
this.C = C;
}
public boolean isTriangle(Triangle tri){
boolean isTrue = false;
if((tri.A>0) &&(tri.B>0) &&(tri.C>0)) {
if((tri.A
&&(tri.C
isTrue = true;
}
return isTrue;
}
public String isType(Triangle tri) {
String strType = "";
if (this.isTriangle(tri)) {
if (tri.A == tri.B && tri.B == tri.C)
strType = "等边三角形";
else if ((tri.A != tri.B) && (tri.B != tri.C) && (tri.A != tri.C))
strType = "不等边三角形";
else
strType = "等腰三角形";
}
return strType;
}
}
测试代码请不要以附件形式提交,请给出测试代码在开发环境中的截图及运行结果