Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
This repository was archived by the owner on Feb 26, 2023. It is now read-only.

How to unit test a custom ClientHttpRequestInterceptor? #1940

@johnjohndoe

Description

@johnjohndoe
  • AndroidAnnotations version: 4.0.0
apt "org.androidannotations:androidannotations:4.0.0"
apt "org.androidannotations:rest-spring:4.0.0"
compile "org.androidannotations:androidannotations-api:4.0.0"
compile "org.androidannotations:rest-spring-api:4.0.0"
  • Android compile SDK version: 23

I wrote a custom interceptor inheriting from ClientHttpRequestInterceptor. I would like to unit test it but got stucked because I could not manually instantiate an HttpRequest. I saw a couple of classes in rest-spring-test which might be helpful. I also saw MockClientHttpRequest. None of both is exposed in the library I depend on.
Is there another test dependency I have to add?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions