1

Is it possible annotate a method with @TargetRequestFilter in a test-class annotated with @RunWith(Parameterized.class)?

@RunWith(Parameterized.class)
public class UserApiTest {
...
    @TargetRequestFilter
    public void addSessionCookieFilter(HttpRequest request) {
        request.addHeader(HttpHeaders.COOKIE, sessionCookie.toString());
    }
...
4

1 回答 1

1

不幸的是没有。@TargetRequestFilter需要@RunWith(PactRunner.class)工作,并且您在测试中只能有一个@RunWith注释。

于 2017-04-24T00:49:59.747 回答