How do I use `@ClassRule` i n kotlin? ``` @Cla...
# announcements
f
How do I use
@ClassRule
i n kotlin?
Copy code
@ClassRule
    public static Neo4jRule neo4j = new Neo4jRule();
I tried
Copy code
@ClassRule
    var neo4j = Neo4jRule()
but it says
The @ClassRule 'neo4j' must be public
a
or try
@get:ClassRule
, this will annotate the property getter as opposed to the underlying private field.
I need to do this for JUnit Rules
it’s less ugly than 2 annotations
Copy code
@JvmField
@ClassRule
vs:
Copy code
@get:ClassRule