junit 有没有办法为常量文件生成测试用例?

gcmastyq  于 2022-11-11  发布在  其他
关注(0)|答案(1)|浏览(170)

当我尝试使用Diffblue cover为常量文件生成测试用例时,它显示“No methods found to test:Diffblue Cover找不到任何可以在您的选择中测试的方法。"。是否有任何方法可以为此文件生成测试用例?

public class ApiValidationErrorConstants {
    public static final String ACCOUNT_MUST_NOT_BE_NULL = "Account cannot be null";
    public static final String ACCOUNT_CANNOT_BE_NEGATIVE = "Account cannot be negative";
    public static final String APP_MUST_NOT_BE_NULL = "App cannot be null";
    public static final String INTEGRATION_MUST_NOT_BE_NULL = "Integration cannot be null";
    public static final String INTEGRATION_CANNOT_BE_NEGATIVE = "Integration cannot be negative";
}

相关问题