When I try to generate test cases for constant file by using Diffblue cover. it shows "No methods found to test: Diffblue Cover was unable to find any methods that can be tested in your selection.". Is there any way to generate test cases for this file?
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";
}
CodePudding user response:
try adding a blank constructor
CodePudding user response:
you can do this: try{} catch(){}