Search in sources :

Example 1 with TSGeneratorExtension

use of io.crnk.gen.typescript.TSGeneratorExtension 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);
}
Also used : Project(org.gradle.api.Project) CrnkBoot(io.crnk.core.boot.CrnkBoot) ResourceMetaProvider(io.crnk.meta.provider.resource.ResourceMetaProvider) File(java.io.File) MetaModule(io.crnk.meta.MetaModule) TSGeneratorExtension(io.crnk.gen.typescript.TSGeneratorExtension) MetaModuleConfig(io.crnk.meta.MetaModuleConfig) EmptyServiceDiscovery(io.crnk.core.module.discovery.EmptyServiceDiscovery) Before(org.junit.Before)

Aggregations

CrnkBoot (io.crnk.core.boot.CrnkBoot)1 EmptyServiceDiscovery (io.crnk.core.module.discovery.EmptyServiceDiscovery)1 TSGeneratorExtension (io.crnk.gen.typescript.TSGeneratorExtension)1 MetaModule (io.crnk.meta.MetaModule)1 MetaModuleConfig (io.crnk.meta.MetaModuleConfig)1 ResourceMetaProvider (io.crnk.meta.provider.resource.ResourceMetaProvider)1 File (java.io.File)1 Project (org.gradle.api.Project)1 Before (org.junit.Before)1