Search in sources :

Example 1 with SheepBlackSheepResourceIsNoMore

use of org.alfresco.rest.framework.tests.api.mocks3.SheepBlackSheepResourceIsNoMore in project alfresco-remote-api by Alfresco.

the class InspectorTests method testWebDeletedAnnotationOnClass.

@Test
public void testWebDeletedAnnotationOnClass() {
    List<ResourceMetadata> metainfo = ResourceInspector.inspect(GrassEntityResourceNowDeleted.class);
    assertTrue("Must be at least one ResourceMetadata", metainfo.size() > 0);
    ResourceMetadata metaData = metainfo.get(0);
    assertNotNull(metaData);
    assertNull("GrassEntityResourceNowDeleted all methods deleted", metaData.getOperation(HttpMethod.GET));
    assertNull("GrassEntityResourceNowDeleted all methods deleted", metaData.getOperation(HttpMethod.PUT));
    assertNull("GrassEntityResourceNowDeleted all methods deleted", metaData.getOperation(HttpMethod.DELETE));
    assertNull("GrassEntityResourceNowDeleted all methods deleted", metaData.getOperation(HttpMethod.POST));
    metainfo = ResourceInspector.inspect(SheepBlackSheepResourceIsNoMore.class);
    assertTrue("Must be at least one ResourceMetadata", metainfo.size() > 0);
    metaData = metainfo.get(0);
    assertNotNull(metaData);
    assertNull("SheepBlackSheepResourceIsNoMore all methods deleted", metaData.getOperation(HttpMethod.GET));
    assertNull("SheepBlackSheepResourceIsNoMore all methods deleted", metaData.getOperation(HttpMethod.PUT));
    assertNull("SheepBlackSheepResourceIsNoMore all methods deleted", metaData.getOperation(HttpMethod.DELETE));
    assertNull("SheepBlackSheepResourceIsNoMore all methods deleted", metaData.getOperation(HttpMethod.POST));
}
Also used : ResourceMetadata(org.alfresco.rest.framework.core.ResourceMetadata) SheepBlackSheepResourceIsNoMore(org.alfresco.rest.framework.tests.api.mocks3.SheepBlackSheepResourceIsNoMore) Test(org.junit.Test)

Aggregations

ResourceMetadata (org.alfresco.rest.framework.core.ResourceMetadata)1 SheepBlackSheepResourceIsNoMore (org.alfresco.rest.framework.tests.api.mocks3.SheepBlackSheepResourceIsNoMore)1 Test (org.junit.Test)1