use of io.crnk.meta.provider.resource.ResourceMetaProvider in project crnk-framework by crnk-project.
the class TSGeneratorTest method setup.
@Before
public void setup() {
Project project = Mockito.mock(Project.class);
TSGeneratorExtension config = new TSGeneratorExtension(project, null);
File outputDir = testProjectDir.getRoot();
MetaModuleConfig metaConfig = new MetaModuleConfig();
metaConfig.addMetaProvider(new ResourceMetaProvider());
MetaModule metaModule = MetaModule.createServerModule(metaConfig);
CrnkBoot boot = new CrnkBoot();
boot.setServiceDiscovery(new EmptyServiceDiscovery());
boot.addModule(metaModule);
boot.boot();
generator = new TSGenerator(outputDir, metaModule.getLookup(), config);
}
use of io.crnk.meta.provider.resource.ResourceMetaProvider in project crnk-framework by crnk-project.
the class MetaModuleProducer method createMetaModule.
@Produces
@ApplicationScoped
public MetaModule createMetaModule() {
MetaModuleConfig metaConfig = new MetaModuleConfig();
metaConfig.addMetaProvider(new ResourceMetaProvider());
MetaModule metaModule = MetaModule.createServerModule(metaConfig);
return metaModule;
}
use of io.crnk.meta.provider.resource.ResourceMetaProvider 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);
}
use of io.crnk.meta.provider.resource.ResourceMetaProvider in project crnk-framework by crnk-project.
the class ResourceMetaProviderTest method setup.
@Before
public void setup() {
super.setup();
resourceProvider = new ResourceMetaProvider();
lookup = new MetaLookup();
lookup.setModuleContext(boot.getModuleRegistry().getContext());
lookup.addProvider(resourceProvider);
lookup.initialize();
}
use of io.crnk.meta.provider.resource.ResourceMetaProvider in project crnk-framework by crnk-project.
the class AbstractMetaJerseyTest method createModule.
public MetaModule createModule() {
MetaModule module = MetaModule.create();
module.addMetaProvider(new ResourceMetaProvider());
return module;
}
Aggregations