// 判断是否是三角形
if(this.isTriangle(triangle))
{
//判断是否是等边三角形 if(triangle.lborderA==triangle.lborderB&&triangle.lborderB==triangle.lborderC)
strType = "等边三角形";
//判断是否是不等边三角形
else if((triangle.lborderA!=triangle.lborderB)&&
(triangle.lborderB!=triangle.lborderC)&&
(triangle.lborderA!=triangle.lborderC))
strType = "不等边三角形";
else
strType="等腰三角形";
}
return strType;
}
}
ExampleTest.java
import junit.framework.*;
/**
* Some tests.
*
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/