Package com.wesabe.grendel.representations

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


      this.doc = mock(Document.class);
      when(doc.getName()).thenReturn("document1.txt");
      when(doc.toString()).thenReturn("document1.txt");
      when(doc.getOwner()).thenReturn(owner);
     
      this.rep = new DocumentListRepresentation(uriInfo, ImmutableSet.of(doc));
    }
View Full Code Here


      this.uriInfo = mock(UriInfo.class);
    }
   
    @Test
    public void itReturnsADocumentListIfValid() throws Exception {
      final DocumentListRepresentation docs = resource.listDocuments(uriInfo, credentials, "bob");
     
      assertThat(docs.getDocuments()).isEqualTo(ImmutableSet.of(document));
      assertThat(docs.getUriInfo()).isEqualTo(uriInfo);
    }
View Full Code Here

  public DocumentListRepresentation listDocuments(@Context UriInfo uriInfo,
    @Context Credentials credentials, @PathParam("id") String id) {
   
    final Session session = credentials.buildSession(userDAO, id);
   
    return new DocumentListRepresentation(uriInfo, session.getUser().getDocuments());
  }
View Full Code Here

TOP

Related Classes of com.wesabe.grendel.representations.DocumentListRepresentation$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.