Davio
05/24/2022, 8:52 AMclass MyTest: SomeSpec({ ... })
But in e.g. vanilla JUnit classes are always recommended to be internal (package private) and I found out that this works as well:
internal class MyTest: SomeSpec({ ... })
Is there a reason test classes should be public or can/should they be internal?wasyl
05/24/2022, 8:55 AMpublic
keywordDavio
05/24/2022, 8:57 AMClass and method visibility
Test classes, test methods, and lifecycle methods are not required to be public, but they must not be private.
It is generally recommended to omit the public modifier for test classes, test methods, and lifecycle methods unless there is a technical reason for doing so – for example, when a test class is extended by a test class in another package. Another technical reason for making classes and methods public is to simplify testing on the module path when using the Java Module System.
Davio
05/24/2022, 8:57 AMDavio
05/24/2022, 8:57 AMMatteo Mirk
05/24/2022, 9:53 AM