I have the empty interface interface HavingUniqueValues(val v: Int) {}
and some enums like enum class EnumName(override val v: Int) : HavingUniqueValues
.
I want the elements in each enum have unique v
-values but I can mistype the values. So I need a test.
- Is it possible to create a test where the interface implementations are saved as a
List
manually and the test checks if all the implementations in theList
meet the requirement? - If yes: is it possible to create a function that returns the
List
of all implementations in the specified package to use it in the test?