Skip to content

missing current instance in TestRule apply() #351

Closed as not planned
Closed as not planned
@RainerW

Description

@RainerW

I switched form 4.8 to 4.10 and decided to change my MethodRule's to TestRule ... bad idea.

I'm missing a way to get the FrameworkMethod, and the current test instance, they are missing now in the apply method:

old:
public Statement apply(final Statement base, final FrameworkMethod method, Object target)

new:
public Statement apply(final Statement base, final Description description)

How can i get them? I debugged and the actual Statement instance is of type InvokeMethod, this would have what i need, but dosn't have getter for the private fields.

So, at the moment i can just keep using MethodRule, but i'm afraid this will not work in further versions anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions