Search in sources :

Example 16 with QueryParamsAdapter

use of io.crnk.legacy.internal.QueryParamsAdapter in project crnk-framework by crnk-project.

the class ResourcePostTest method toQueryAdapter.

private QueryAdapter toQueryAdapter(QueryParams requestParams, Class resourceType) {
    ResourceRegistry resourceRegistry = moduleRegistry.getResourceRegistry();
    RegistryEntry entry = resourceRegistry.getEntry(resourceType);
    ResourceInformation resourceInformation = entry.getResourceInformation();
    return new QueryParamsAdapter(resourceInformation, requestParams, moduleRegistry);
}
Also used : ResourceInformation(io.crnk.core.engine.information.resource.ResourceInformation) ResourceRegistry(io.crnk.core.engine.registry.ResourceRegistry) QueryParamsAdapter(io.crnk.legacy.internal.QueryParamsAdapter) RegistryEntry(io.crnk.core.engine.registry.RegistryEntry)

Example 17 with QueryParamsAdapter

use of io.crnk.legacy.internal.QueryParamsAdapter in project crnk-framework by crnk-project.

the class AnnotatedRelationshipRepositoryAdapterTest method setUp.

@Before
public void setUp() throws Exception {
    queryParams = new QueryParams();
    queryAdapter = new QueryParamsAdapter(queryParams);
    parameterProvider = new ParametersFactory(new NewInstanceRepositoryMethodParameterProvider());
}
Also used : NewInstanceRepositoryMethodParameterProvider(io.crnk.core.engine.repository.mock.NewInstanceRepositoryMethodParameterProvider) ParametersFactory(io.crnk.legacy.internal.ParametersFactory) QueryParams(io.crnk.legacy.queryParams.QueryParams) QueryParamsAdapter(io.crnk.legacy.internal.QueryParamsAdapter) Before(org.junit.Before)

Aggregations

QueryParamsAdapter (io.crnk.legacy.internal.QueryParamsAdapter)17 Test (org.junit.Test)11 QueryParams (io.crnk.legacy.queryParams.QueryParams)10 Resource (io.crnk.core.engine.document.Resource)6 Response (io.crnk.core.engine.dispatcher.Response)5 JsonPath (io.crnk.core.engine.internal.dispatcher.path.JsonPath)5 ResourceInformation (io.crnk.core.engine.information.resource.ResourceInformation)4 RegistryEntry (io.crnk.core.engine.registry.RegistryEntry)4 ResourceRegistry (io.crnk.core.engine.registry.ResourceRegistry)4 Project (io.crnk.core.mock.models.Project)4 Task (io.crnk.core.mock.models.Task)4 DefaultQueryParamsParser (io.crnk.legacy.queryParams.DefaultQueryParamsParser)4 QueryParamsBuilder (io.crnk.legacy.queryParams.QueryParamsBuilder)4 Document (io.crnk.core.engine.document.Document)3 ResourceModificationFilter (io.crnk.core.engine.filter.ResourceModificationFilter)3 ResourceField (io.crnk.core.engine.information.resource.ResourceField)3 BaseControllerTest (io.crnk.core.engine.internal.dispatcher.controller.BaseControllerTest)3 NewInstanceRepositoryMethodParameterProvider (io.crnk.core.engine.repository.mock.NewInstanceRepositoryMethodParameterProvider)3 TaskToProjectRepository (io.crnk.core.mock.repository.TaskToProjectRepository)3 ParametersFactory (io.crnk.legacy.internal.ParametersFactory)3