Search in sources :

Example 1 with MetaArrayType

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

the class MetaLookupTest method testObjectArrayMeta.

@Test
public void testObjectArrayMeta() {
    MetaArrayType meta = metaProvider.discoverMeta(TestEntity[].class);
    MetaType elementType = meta.getElementType();
    Assert.assertTrue(elementType instanceof MetaDataObject);
}
Also used : TestEntity(io.crnk.jpa.model.TestEntity) MetaDataObject(io.crnk.meta.model.MetaDataObject) MetaArrayType(io.crnk.meta.model.MetaArrayType) MetaType(io.crnk.meta.model.MetaType) Test(org.junit.Test)

Example 2 with MetaArrayType

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

the class MetaLookupTest method testPrimitiveArrayMeta.

@Test
public void testPrimitiveArrayMeta() {
    MetaArrayType type = (MetaArrayType) metaProvider.discoverMeta(byte[].class).asType();
    Assert.assertEquals(byte[].class, type.getImplementationClass());
}
Also used : MetaArrayType(io.crnk.meta.model.MetaArrayType) Test(org.junit.Test)

Aggregations

MetaArrayType (io.crnk.meta.model.MetaArrayType)2 Test (org.junit.Test)2 TestEntity (io.crnk.jpa.model.TestEntity)1 MetaDataObject (io.crnk.meta.model.MetaDataObject)1 MetaType (io.crnk.meta.model.MetaType)1