Search in sources :

Example 21 with MetaType

use of io.crnk.meta.model.MetaType in project crnk-framework by crnk-project.

the class MetaMetaTest method testLinksNaming.

@Test
public void testLinksNaming() {
    MetaResource taskMeta = resourceProvider.getMeta(Task.class);
    MetaAttribute linksInformation = taskMeta.getAttribute("linksInformation");
    MetaType type = linksInformation.getType();
    Assert.assertEquals(type.getId(), "resources.tasks$links");
    Assert.assertEquals(type.getName(), "TaskLinks");
}
Also used : MetaResource(io.crnk.meta.model.resource.MetaResource) MetaAttribute(io.crnk.meta.model.MetaAttribute) MetaType(io.crnk.meta.model.MetaType) Test(org.junit.Test)

Aggregations

MetaType (io.crnk.meta.model.MetaType)21 Test (org.junit.Test)16 MetaAttribute (io.crnk.meta.model.MetaAttribute)5 MetaDataObject (io.crnk.meta.model.MetaDataObject)3 TSField (io.crnk.gen.typescript.model.TSField)2 MetaResource (io.crnk.meta.model.resource.MetaResource)2 Type (java.lang.reflect.Type)2 ResourceFieldType (io.crnk.core.engine.information.resource.ResourceFieldType)1 ResourceInformation (io.crnk.core.engine.information.resource.ResourceInformation)1 RegistryEntry (io.crnk.core.engine.registry.RegistryEntry)1 ResourceRegistry (io.crnk.core.engine.registry.ResourceRegistry)1 SerializeType (io.crnk.core.resource.annotations.SerializeType)1 TSParameterizedType (io.crnk.gen.typescript.model.TSParameterizedType)1 TSType (io.crnk.gen.typescript.model.TSType)1 MetaJpaDataObject (io.crnk.jpa.meta.MetaJpaDataObject)1 TestEntity (io.crnk.jpa.model.TestEntity)1 MetaArrayType (io.crnk.meta.model.MetaArrayType)1 MetaMapType (io.crnk.meta.model.MetaMapType)1 MetaResourceField (io.crnk.meta.model.resource.MetaResourceField)1 ParameterizedType (java.lang.reflect.ParameterizedType)1