Search in sources :

Example 1 with MetaResourceRepositoryImpl

use of io.crnk.meta.internal.MetaResourceRepositoryImpl in project crnk-framework by crnk-project.

the class MetaResourceRepositoryTest method setup.

@Before
public void setup() {
    super.setup();
    ResourceMetaProvider provider = new ResourceMetaProvider();
    lookup = new MetaLookup();
    lookup.setModuleContext(boot.getModuleRegistry().getContext());
    lookup.addProvider(provider);
    lookup.initialize();
    repo = new MetaResourceRepositoryImpl(new Supplier<MetaLookup>() {

        @Override
        public MetaLookup get() {
            return lookup;
        }
    }, MetaElement.class);
}
Also used : MetaElement(io.crnk.meta.model.MetaElement) ResourceMetaProvider(io.crnk.meta.provider.resource.ResourceMetaProvider) MetaResourceRepositoryImpl(io.crnk.meta.internal.MetaResourceRepositoryImpl) Supplier(io.crnk.core.utils.Supplier) Before(org.junit.Before)

Aggregations

Supplier (io.crnk.core.utils.Supplier)1 MetaResourceRepositoryImpl (io.crnk.meta.internal.MetaResourceRepositoryImpl)1 MetaElement (io.crnk.meta.model.MetaElement)1 ResourceMetaProvider (io.crnk.meta.provider.resource.ResourceMetaProvider)1 Before (org.junit.Before)1