Package com.wesabe.grendel.entities

Examples of com.wesabe.grendel.entities.Document


      final FileInputStream recipientKeyring = new FileInputStream("src/test/resources/another-secret-keyring.gpg");
      this.recipientKeySet = KeySet.load(recipientKeyring);
      recipientKeyring.close();

      this.owner = new User(ownerKeySet);
      this.doc = new Document(owner, "test", MediaType.APPLICATION_OCTET_STREAM_TYPE);
    }
View Full Code Here


   
    @SuppressWarnings("deprecation")
    @Before
    public void setup() throws Exception {
      this.user = new User();
      this.document = new Document();
     
      document.linkUser(user);
    }
View Full Code Here

   
    @SuppressWarnings("deprecation")
    @Before
    public void setup() throws Exception {
      this.user = new User();
      this.document = new Document();
     
      document.linkUser(user);
     
      document.unlinkUser(user);
    }
View Full Code Here

      DateTimeUtils.setCurrentMillisSystem();
    }
   
    @Test
    public void itHasAnOwner() throws Exception {
      final Document doc = new Document(owner, name, MediaType.APPLICATION_OCTET_STREAM_TYPE);
     
      assertThat(doc.getOwner()).isEqualTo(owner);
    }
View Full Code Here

      assertThat(doc.getOwner()).isEqualTo(owner);
    }
   
    @Test
    public void itHasAName() throws Exception {
      final Document doc = new Document(owner, name, MediaType.APPLICATION_OCTET_STREAM_TYPE);
     
      assertThat(doc.getName()).isEqualTo(name);
    }
View Full Code Here

      assertThat(doc.getName()).isEqualTo(name);
    }
   
    @Test
    public void itHasAModificationTimestamp() throws Exception {
      final Document doc = new Document(owner, name, MediaType.APPLICATION_OCTET_STREAM_TYPE);
     
      assertThat(doc.getModifiedAt()).isEqualTo(now);
    }
View Full Code Here

      assertThat(doc.getModifiedAt()).isEqualTo(now);
    }
   
    @Test
    public void itHasACreationTimestamp() throws Exception {
      final Document doc = new Document(owner, name, MediaType.APPLICATION_OCTET_STREAM_TYPE);
     
      assertThat(doc.getCreatedAt()).isEqualTo(now);
    }
View Full Code Here

      assertThat(doc.getCreatedAt()).isEqualTo(now);
    }
   
    @Test
    public void itHasAContentType() throws Exception {
      final Document doc = new Document(owner, name, MediaType.APPLICATION_OCTET_STREAM_TYPE);
     
      assertThat(doc.getContentType()).isEqualTo(MediaType.APPLICATION_OCTET_STREAM_TYPE);
    }
View Full Code Here

      assertThat(doc.getContentType()).isEqualTo(MediaType.APPLICATION_OCTET_STREAM_TYPE);
    }
   
    @Test
    public void itIsLinkable() throws Exception {
      final Document doc = new Document(owner, name, MediaType.APPLICATION_OCTET_STREAM_TYPE);
     
      assertThat(doc.toString()).isEqualTo(name);
    }
View Full Code Here

      assertThat(doc.toString()).isEqualTo(name);
    }
   
    @Test
    public void itHasAnETag() throws Exception {
      final Document doc = new Document(owner, name, MediaType.APPLICATION_OCTET_STREAM_TYPE);
     
      assertThat(doc.getEtag()).isEqualTo("doc-document1.txt-0");
    }
View Full Code Here

TOP

Related Classes of com.wesabe.grendel.entities.Document

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.