Search in sources :

Example 1 with QuerySpecDeserializerContext

use of io.crnk.core.queryspec.QuerySpecDeserializerContext in project crnk-framework by crnk-project.

the class DefaultQuerySpecDeserializerTestBase method setup.

@Before
public void setup() {
    super.setup();
    deserializerContext = new QuerySpecDeserializerContext() {

        @Override
        public ResourceRegistry getResourceRegistry() {
            return resourceRegistry;
        }

        @Override
        public TypeParser getTypeParser() {
            return moduleRegistry.getTypeParser();
        }
    };
    deserializer = new DefaultQuerySpecDeserializer();
    deserializer.init(deserializerContext);
    taskInformation = resourceRegistry.getEntry(Task.class).getResourceInformation();
    taskWithPagingBehaviorInformation = resourceRegistry.getEntry(TaskWithPagingBehavior.class).getResourceInformation();
}
Also used : TypeParser(io.crnk.core.engine.parser.TypeParser) DefaultQuerySpecDeserializer(io.crnk.core.queryspec.DefaultQuerySpecDeserializer) ResourceRegistry(io.crnk.core.engine.registry.ResourceRegistry) QuerySpecDeserializerContext(io.crnk.core.queryspec.QuerySpecDeserializerContext) Before(org.junit.Before)

Aggregations

TypeParser (io.crnk.core.engine.parser.TypeParser)1 ResourceRegistry (io.crnk.core.engine.registry.ResourceRegistry)1 DefaultQuerySpecDeserializer (io.crnk.core.queryspec.DefaultQuerySpecDeserializer)1 QuerySpecDeserializerContext (io.crnk.core.queryspec.QuerySpecDeserializerContext)1 Before (org.junit.Before)1