Search in sources :

Example 1 with ProjectsMetaInformation

use of io.crnk.test.mock.repository.ProjectRepository.ProjectsMetaInformation in project crnk-framework by crnk-project.

the class InformationClientTest method testMeta.

@Test
public void testMeta() {
    QuerySpec querySpec = new QuerySpec(Project.class);
    ResourceList<Project> list = projectRepo.findAll(querySpec);
    ProjectsMetaInformation metaInformation = list.getMeta(ProjectsMetaInformation.class);
    Assert.assertEquals("testMeta", metaInformation.getMetaValue());
    Project project = list.get(0);
    ProjectMeta projectMeta = project.getMeta();
    Assert.assertNotNull(projectMeta);
    Assert.assertEquals("someMetaValue", projectMeta.getValue());
}
Also used : Project(io.crnk.test.mock.models.Project) QuerySpec(io.crnk.core.queryspec.QuerySpec) ProjectsMetaInformation(io.crnk.test.mock.repository.ProjectRepository.ProjectsMetaInformation) ProjectMeta(io.crnk.test.mock.models.Project.ProjectMeta) Test(org.junit.Test)

Aggregations

QuerySpec (io.crnk.core.queryspec.QuerySpec)1 Project (io.crnk.test.mock.models.Project)1 ProjectMeta (io.crnk.test.mock.models.Project.ProjectMeta)1 ProjectsMetaInformation (io.crnk.test.mock.repository.ProjectRepository.ProjectsMetaInformation)1 Test (org.junit.Test)1