use of io.crnk.meta.model.MetaType in project crnk-framework by crnk-project.
the class MetaLookupTest method testPrimitiveShort.
@Test
public void testPrimitiveShort() {
MetaType meta = resourceProvider.getMeta(Short.class);
Assert.assertEquals("base.short", meta.getId());
Assert.assertEquals(Short.class, meta.getImplementationClass());
MetaType primitiveMeta = resourceProvider.getMeta(short.class);
Assert.assertSame(meta, primitiveMeta);
}
use of io.crnk.meta.model.MetaType in project crnk-framework by crnk-project.
the class MetaLookupTest method testPrimitiveDouble.
@Test
public void testPrimitiveDouble() {
MetaType meta = resourceProvider.getMeta(Double.class);
Assert.assertEquals("base.double", meta.getId());
Assert.assertEquals(Double.class, meta.getImplementationClass());
MetaType primitiveMeta = resourceProvider.getMeta(double.class);
Assert.assertSame(meta, primitiveMeta);
}
use of io.crnk.meta.model.MetaType in project crnk-framework by crnk-project.
the class MetaLookupTest method testOffsetDateTime.
@Test
// add with Java 8
@Ignore
public void testOffsetDateTime() throws ClassNotFoundException {
if (ClassUtils.existsClass("java.time.OffsetDateTime")) {
Class<?> offsetDateTimeClass = Class.forName("java.time.OffsetDateTime");
MetaType meta = resourceProvider.getMeta(offsetDateTimeClass);
Assert.assertEquals("base.offsetDateTime", meta.getId());
Assert.assertEquals(offsetDateTimeClass, meta.getImplementationClass());
}
}
use of io.crnk.meta.model.MetaType in project crnk-framework by crnk-project.
the class MetaLookupTest method testPrimitiveLong.
@Test
public void testPrimitiveLong() {
MetaType meta = resourceProvider.getMeta(Long.class);
Assert.assertEquals("base.long", meta.getId());
Assert.assertEquals(Long.class, meta.getImplementationClass());
MetaType primitiveMeta = resourceProvider.getMeta(long.class);
Assert.assertSame(meta, primitiveMeta);
}
use of io.crnk.meta.model.MetaType in project crnk-framework by crnk-project.
the class MetaMetaTest method testMetaNaming.
@Test
public void testMetaNaming() {
MetaResource taskMeta = resourceProvider.getMeta(Task.class);
MetaAttribute metaInformation = taskMeta.getAttribute("metaInformation");
MetaType type = metaInformation.getType();
Assert.assertEquals(type.getId(), "resources.tasks$meta");
Assert.assertEquals(type.getName(), "TaskMeta");
}
Aggregations