Unknown sonarqube test conditions on my Scala class

Viewed 19

I am trying to improve test coverage on my Scala code. One of the class looks like:

class MyConfig {
   val param1: String = sys.env("some string")
   
   val param2: String = scala.util.Properties.envOrElse(SOME_CONSTANT_NAME, null)

}

There are a total of about 30 params like that, all but one are string type (the remaining one is boolean)

Sonarqube is labeling a red tag on the line of "class MyConfig" and reporting 4 conditions not being tested. I did test the boolean param to true and false. What other conditions should I be testing in a class like this when all are strings parameters?

Thanks for any input.

0 Answers
Related