Search in sources :

Example 1 with TSMetaTransformationContext

use of io.crnk.gen.typescript.transform.TSMetaTransformationContext in project crnk-framework by crnk-project.

the class TSGeneratorTest method throwExceptionWhenMetaElementNotMappedToNpmPackage.

@Test(expected = UnsupportedOperationException.class)
public void throwExceptionWhenMetaElementNotMappedToNpmPackage() {
    TSMetaTransformationContext transformationContext = generator.createMetaTransformationContext();
    MetaElement metaElement = Mockito.mock(MetaElement.class);
    metaElement.setId("does.not.exist");
    transformationContext.getNpmPackage(metaElement);
}
Also used : MetaElement(io.crnk.meta.model.MetaElement) TSMetaTransformationContext(io.crnk.gen.typescript.transform.TSMetaTransformationContext) Test(org.junit.Test)

Example 2 with TSMetaTransformationContext

use of io.crnk.gen.typescript.transform.TSMetaTransformationContext in project crnk-framework by crnk-project.

the class TSGeneratorTest method throwExceptionWhenMetaElementNotMappedToDirectory.

@Test(expected = UnsupportedOperationException.class)
public void throwExceptionWhenMetaElementNotMappedToDirectory() {
    TSMetaTransformationContext transformationContext = generator.createMetaTransformationContext();
    MetaElement metaElement = Mockito.mock(MetaElement.class);
    metaElement.setId("does.not.exist");
    transformationContext.getDirectory(metaElement);
}
Also used : MetaElement(io.crnk.meta.model.MetaElement) TSMetaTransformationContext(io.crnk.gen.typescript.transform.TSMetaTransformationContext) Test(org.junit.Test)

Aggregations

TSMetaTransformationContext (io.crnk.gen.typescript.transform.TSMetaTransformationContext)2 MetaElement (io.crnk.meta.model.MetaElement)2 Test (org.junit.Test)2