Search in sources :

Example 1 with ProjectsLinksInformation

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

the class InformationClientTest method testLinks.

@Test
public void testLinks() {
    QuerySpec querySpec = new QuerySpec(Project.class);
    ResourceList<Project> list = projectRepo.findAll(querySpec);
    ProjectsLinksInformation lnksInformation = list.getLinks(ProjectsLinksInformation.class);
    Assert.assertEquals("testLink", lnksInformation.getLinkValue());
    Project project = list.get(0);
    ProjectLinks projectLinks = project.getLinks();
    Assert.assertNotNull(projectLinks);
    Assert.assertEquals("someLinkValue", projectLinks.getValue());
}
Also used : Project(io.crnk.test.mock.models.Project) ProjectsLinksInformation(io.crnk.test.mock.repository.ProjectRepository.ProjectsLinksInformation) ProjectLinks(io.crnk.test.mock.models.Project.ProjectLinks) QuerySpec(io.crnk.core.queryspec.QuerySpec) Test(org.junit.Test)

Aggregations

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