コード例 #1
0
  @Test(expected = RepositoryException.class)
  public void testCreateRepositoryFromNonexistentRepositoryId() throws Exception {

    long repositoryId = RandomTestUtil.randomLong();

    RepositoryLocalServiceUtil.getRepositoryImpl(repositoryId);
  }
コード例 #2
0
  @Test
  public void testCreateRepositoryFromExistingRepositoryId() throws Exception {

    DLFolder dlFolder = DLTestUtil.addDLFolder(_group.getGroupId());

    RepositoryLocalServiceUtil.getRepositoryImpl(dlFolder.getRepositoryId());
  }
コード例 #3
0
  @Test(expected = NoSuchRepositoryEntryException.class)
  public void testCreateRepositoryFromNonexistentFileVersionId() throws Exception {

    long fileVersionId = RandomTestUtil.randomLong();

    RepositoryLocalServiceUtil.getRepositoryImpl(0, 0, fileVersionId);
  }
コード例 #4
0
  @Test
  public void testCreateRepositoryFromExistingFileEntryId() throws Exception {
    DLFolder dlFolder = DLTestUtil.addDLFolder(_group.getGroupId());

    DLFileEntry dlFileEntry = DLTestUtil.addDLFileEntry(dlFolder.getFolderId());

    RepositoryLocalServiceUtil.getRepositoryImpl(0, dlFileEntry.getFileEntryId(), 0);
  }