Package com.wesabe.grendel.representations

Examples of com.wesabe.grendel.representations.LinkedDocumentListRepresentation$DocumentListItem


      this.user = mock(User.class);
      when(user.getId()).thenReturn("capnfrank");
      when(user.toString()).thenReturn("capnfrank");
      when(user.getLinkedDocuments()).thenReturn(ImmutableSet.of(doc));
     
      this.rep = new LinkedDocumentListRepresentation(uriInfo, user);
    }
View Full Code Here


      this.uriInfo = mock(UriInfo.class);
    }
   
    @Test
    public void itReturnsADocumentList() throws Exception {
      final LinkedDocumentListRepresentation docs = resource.listDocuments(uriInfo, credentials, "bob");
     
      assertThat(docs.getUser()).isEqualTo(user);
      assertThat(docs.getUriInfo()).isEqualTo(uriInfo);
    }
View Full Code Here

  public LinkedDocumentListRepresentation listDocuments(@Context UriInfo uriInfo,
    @Context Credentials credentials, @PathParam("id") String id) {
   
    final Session session = credentials.buildSession(userDAO, id);

    return new LinkedDocumentListRepresentation(uriInfo, session.getUser());
  }
View Full Code Here

TOP

Related Classes of com.wesabe.grendel.representations.LinkedDocumentListRepresentation$DocumentListItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.