use of io.crnk.core.engine.internal.dispatcher.controller.RelationshipsResourceGet in project crnk-framework by crnk-project.
the class RelationshipsResourceGetTest method onGivenRequestLinkResourceGetShouldReturnNullData.
@Test
public void onGivenRequestLinkResourceGetShouldReturnNullData() throws Exception {
// GIVEN
JsonPath jsonPath = pathBuilder.build("/tasks/1/relationships/project");
RelationshipsResourceGet sut = new RelationshipsResourceGet(resourceRegistry, typeParser, documentMapper);
// WHEN
Response response = sut.handle(jsonPath, emptyProjectQuery, null, null);
// THEN
Assert.assertNotNull(response);
}
use of io.crnk.core.engine.internal.dispatcher.controller.RelationshipsResourceGet in project crnk-framework by crnk-project.
the class RelationshipsResourceGetTest method onFieldRequestShouldDenyIt.
@Test
public void onFieldRequestShouldDenyIt() {
// GIVEN
JsonPath jsonPath = new ResourcePath("tasks/1/project");
ResourceRegistry resourceRegistry = mock(ResourceRegistry.class);
RelationshipsResourceGet sut = new RelationshipsResourceGet(resourceRegistry, typeParser, documentMapper);
// WHEN
boolean result = sut.isAcceptable(jsonPath, REQUEST_TYPE);
// THEN
assertThat(result).isFalse();
}
Aggregations