@Test public void testGet() throws URISyntaxException { String learningStandardId = resourceService.postEntity(learningStandards, createLearningStandardEntity()); String assessmentId = resourceService.postEntity(assessments, createAssessmentEntity(learningStandardId)); setupMocks(BASE_URI + "/" + assessmentId + "/learningStandards"); Response response = assessmentResource.get(uriInfo, assessmentId); assertEquals("Status code should be OK", Response.Status.OK.getStatusCode(), response.getStatus()); EntityResponse entityResponse = (EntityResponse) response.getEntity(); assertEquals("Should match", 1, ((List<EntityBody>) entityResponse.getEntity()).size()); }
@GET public Response get(@Context final UriInfo uriInfo, @PathParam("id") final String id) { return getAllResponseBuilder.build(uriInfo, ResourceTemplate.THREE_PART, ResourceMethod.GET, new GetResourceLogic() { @Override public ServiceResponse run(Resource resource) { final Resource base = resourceHelper.getBaseName(uriInfo, ResourceTemplate.THREE_PART); return assessmentResourceService.getLearningStandards(base, id, resource, uriInfo.getRequestUri()); } }); }
AssessmentResource extends GenericResource { @GET public Response get(@Context final UriInfo uriInfo, @PathParam("id") final String id) { return getAllResponseBuilder.build(uriInfo, ResourceTemplate.THREE_PART, ResourceMethod.GET, new GetResourceLogic() { @Override public ServiceResponse run(Resource resource) { final Resource base = resourceHelper.getBaseName(uriInfo, ResourceTemplate.THREE_PART); return assessmentResourceService.getLearningStandards(base, id, resource, uriInfo.getRequestUri()); } }); } }
AssessmentResource extends GenericResource { @GET public Response get(@Context final UriInfo uriInfo, @PathParam("id") final String id) { return getAllResponseBuilder.build(uriInfo, ResourceTemplate.THREE_PART, ResourceMethod.GET, new GetResourceLogic() { @Override public ServiceResponse run(Resource resource) { final Resource base = resourceHelper.getBaseName(uriInfo, ResourceTemplate.THREE_PART); return assessmentResourceService.getLearningStandards(base, id, resource, uriInfo.getRequestUri()); } }); }  }
AssessmentResource extends GenericResource { @GET public Response get(@Context final UriInfo uriInfo, @PathParam("id") final String id) { return getAllResponseBuilder.build(uriInfo, ResourceTemplate.THREE_PART, ResourceMethod.GET, new GetResourceLogic() { @Override public ServiceResponse run(Resource resource) { final Resource base = resourceHelper.getBaseName(uriInfo, ResourceTemplate.THREE_PART); return assessmentResourceService.getLearningStandards(base, id, resource, uriInfo.getRequestUri()); } }); }  @GET Response get(@Context final UriInfo uriInfo,
                        @PathParam("id") final String id); }
AssessmentResource extends GenericResource { @GET public Response get(@Context final UriInfo uriInfo, @PathParam("id") final String id) { return getAllResponseBuilder.build(uriInfo, ResourceTemplate.THREE_PART, ResourceMethod.GET, new GetResourceLogic() { @Override public ServiceResponse run(Resource resource) { final Resource base = resourceHelper.getBaseName(uriInfo, ResourceTemplate.THREE_PART); return assessmentResourceService.getLearningStandards(base, id, resource, uriInfo.getRequestUri()); } }); }  @GET Response get(@Context final UriInfo uriInfo,
                        @PathParam("id") final String id);  }