Ignore:
Timestamp:
08/22/13 16:28:29 (11 years ago)
Author:
olhsha
Message:

replacing setURI(externa_id) with setURI(serviceURI_externalId). The implementation idea has been tested on getAnnotation method. Works. Now it must be implemented for get-method of the other resources for the other resources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/test/java/eu/dasish/annotation/backend/rest/AnnotationResourceTest.java

    r3455 r3461  
    7575        mockery.checking(new Expectations() {
    7676            {
     77                oneOf(daoDispatcher).setServiceURI(with(any(String.class)));
     78                will(doAll());
     79               
    7780                oneOf(daoDispatcher).getAnnotationInternalIdentifier(with(any(UUID.class)));               
    7881                will(returnValue(annotationID));               
     
    8285            }
    8386        });
     87       
     88        final MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();
     89        httpServletRequest.setServletPath(TestBackendConstants._TEST_SERVLET_URI);       
     90        annotationResource.setHttpRequest(httpServletRequest);
    8491         
    8592        JAXBElement<Annotation> result = annotationResource.getAnnotation(externalIDstring);
     
    141148        mockery.checking(new Expectations() {
    142149            {
     150                oneOf(daoDispatcher).setServiceURI(with(any(String.class)));
     151                will(doAll());
     152               
    143153                oneOf(daoDispatcher).getUserInternalIdentifier(with(aNonNull(UUID.class)));
    144154                will(returnValue(ownerID));
     
    155165       
    156166        final MockHttpServletRequest httpServletRequest = new MockHttpServletRequest();
    157         httpServletRequest.setRemoteUser(TestBackendConstants._TEST_USER_5_EXT_ID);       
     167        httpServletRequest.setRemoteUser(TestBackendConstants._TEST_USER_5_EXT_ID);         
     168        httpServletRequest.setServletPath(TestBackendConstants._TEST_SERVLET_URI);     
    158169        annotationResource.setHttpRequest(httpServletRequest);
    159170       
Note: See TracChangeset for help on using the changeset viewer.