提问人:Keerthi Senthil 提问时间:6/15/2023 最后编辑:Keerthi Senthil 更新时间:6/16/2023 访问量:28
如何为私有最终匿名类编写testng测试用例
How to write testng testcase for private final anonymous class
问:
private final SampleFormatter sampleFormatter = new SampleFormatter() {
@Override
public String formatDouble (int tag, double Value, int pre) {
if (Double.isNaN(Value)) {
return "NaN";
}
if (Value == 0.0D) {
return "0";
} else {
return df.format(Value);
}
}
}
这里示例格式化程序是一个接口,它的方法在这里实现。
如何通过编写 testng 测试用例来获得这种格式 Double() 方法的覆盖率。
答: 暂无答案
评论