mercredi 18 novembre 2015

Good way to unit test Retorfit interface declaration

I have next interface declaration:

public interface FundaService
{
    @GET( "/feeds/Aanbod.svc/json/{key}" )
    Observable<JsonResponse> queryData( @Path( "key" ) String key, @Query("type" ) String type, @Query( "zo" ) String search, @Query( "page" ) int page, @Query( "pagesize" ) int pageSize );
}

That I use after with Retrofit. What would be an elegant way of testing that I didn't make mistakes in URL declaration and query parameters?

I see that I can mock web layer and check urls with parameters.

Aucun commentaire:

Enregistrer un commentaire