Search in sources :

Example 1 with DocumentViewInterface

use of com.blazebit.persistence.view.testsuite.basic.model.DocumentViewInterface in project blaze-persistence by Blazebit.

the class ViewMetamodelTest method testMappingAttributesInterfaceView.

@Test
public void testMappingAttributesInterfaceView() {
    ViewMetamodel viewMetamodel = getViewMetamodel();
    Set<MethodAttribute<? super DocumentViewInterface, ?>> attributes = viewMetamodel.view(DocumentViewInterface.class).getAttributes();
    assertEquals(6, attributes.size());
}
Also used : DocumentViewInterface(com.blazebit.persistence.view.testsuite.basic.model.DocumentViewInterface) MethodAttribute(com.blazebit.persistence.view.metamodel.MethodAttribute) ViewMetamodel(com.blazebit.persistence.view.metamodel.ViewMetamodel) Test(org.junit.Test) AbstractEntityViewTest(com.blazebit.persistence.view.testsuite.AbstractEntityViewTest)

Example 2 with DocumentViewInterface

use of com.blazebit.persistence.view.testsuite.basic.model.DocumentViewInterface in project blaze-persistence by Blazebit.

the class ViewMetamodelTest method testGetConstructorsInterfaceView.

@Test
public void testGetConstructorsInterfaceView() {
    ViewMetamodel viewMetamodel = getViewMetamodel();
    ViewType<DocumentViewInterface> viewType = viewMetamodel.view(DocumentViewInterface.class);
    Set<MappingConstructor<DocumentViewInterface>> constructors = viewType.getConstructors();
    assertEquals(0, constructors.size());
}
Also used : DocumentViewInterface(com.blazebit.persistence.view.testsuite.basic.model.DocumentViewInterface) MappingConstructor(com.blazebit.persistence.view.metamodel.MappingConstructor) ViewMetamodel(com.blazebit.persistence.view.metamodel.ViewMetamodel) Test(org.junit.Test) AbstractEntityViewTest(com.blazebit.persistence.view.testsuite.AbstractEntityViewTest)

Aggregations

ViewMetamodel (com.blazebit.persistence.view.metamodel.ViewMetamodel)2 AbstractEntityViewTest (com.blazebit.persistence.view.testsuite.AbstractEntityViewTest)2 DocumentViewInterface (com.blazebit.persistence.view.testsuite.basic.model.DocumentViewInterface)2 Test (org.junit.Test)2 MappingConstructor (com.blazebit.persistence.view.metamodel.MappingConstructor)1 MethodAttribute (com.blazebit.persistence.view.metamodel.MethodAttribute)1