use of io.crnk.meta.MetaModuleConfig 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.MetaModuleConfig 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.MetaModuleConfig in project crnk-framework by crnk-project.
the class JsonApiFormatTest method setup.
@Before
public void setup() {
MetaModuleConfig config = new MetaModuleConfig();
config.addMetaProvider(new ResourceMetaProvider());
MetaModule metaModule = MetaModule.createServerModule(config);
this.module = Mockito.spy(HomeModule.create(HomeFormat.JSON_API));
boot = new CrnkBoot();
boot.addModule(module);
boot.addModule(metaModule);
boot.addModule(new TestModule());
boot.setServiceUrlProvider(new ConstantServiceUrlProvider("http://localhost"));
boot.boot();
}
use of io.crnk.meta.MetaModuleConfig in project crnk-framework by crnk-project.
the class JsonHomeFormatTest method setup.
@Before
public void setup() {
MetaModuleConfig config = new MetaModuleConfig();
config.addMetaProvider(new ResourceMetaProvider());
MetaModule metaModule = MetaModule.createServerModule(config);
this.module = Mockito.spy(HomeModule.create(HomeFormat.JSON_HOME));
boot = new CrnkBoot();
boot.addModule(module);
boot.addModule(metaModule);
boot.addModule(new TestModule());
boot.setServiceUrlProvider(new ConstantServiceUrlProvider("http://localhost"));
boot.boot();
}
Aggregations