由于对junit陌生,因此发现此类方法令人困惑。任何提示或解决方案将不胜感激。 我能够为一些数学运算编写测试用例,但无法为此类方法编写。
public class ErrorThreshold {
private String attributeType = null;
private String errorCode = null;
public ErrorThreshold()
{
}
public ErrorThreshold(String attributeType, String errorCode)
{
this.attributeType = attributeType;
this.errorCode = errorCode;
}
public String getAttributeType() {
return attributeType;
}
public void setAttributeType(String attributeType) {
this.attributeType = attributeType;
}
public String getErrorCode() {
return errorCode;
}
public void setErrorCode(String errorCode) {
this.errorCode = errorCode;
}
}