use of org.alfresco.rest.framework.core.ResourceMetadata in project alfresco-remote-api by Alfresco.
the class ParamsExtractorTests method mockRelationship.
/**
* Mocks a Relationship Resource
* @return ResourceMetadata a Relationship
*/
private static ResourceMetadata mockRelationship() {
ResourceMetadata resourceMock = mock(ResourceMetadata.class);
ResourceOperation resourceOperation = mock(ResourceOperation.class);
when(resourceMock.getOperation(notNull(HttpMethod.class))).thenReturn(resourceOperation);
when(resourceMock.getType()).thenReturn(ResourceMetadata.RESOURCE_TYPE.RELATIONSHIP);
when(resourceMock.getObjectType(notNull(ResourceOperation.class))).thenReturn(Farmer.class);
return resourceMock;
}
use of org.alfresco.rest.framework.core.ResourceMetadata in project alfresco-remote-api by Alfresco.
the class ParamsExtractorTests method mockProperty.
/**
* Mocks a Property Resource
* @return ResourceMetadata a Entity
*/
private static ResourceMetadata mockProperty() {
ResourceMetadata resourceMock = mock(ResourceMetadata.class);
when(resourceMock.getType()).thenReturn(ResourceMetadata.RESOURCE_TYPE.PROPERTY);
// when(resourceMock.getObjectType(HttpMethod.POST)).thenReturn(Farmer.class);
return resourceMock;
}
Aggregations