コード例 #1
0
  @Test
  public void testCountByG_U_F_M_StatusInTrashByMimeType() throws Exception {
    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_IN_TRASH, true);

    Assert.assertEquals(1, doCountBy_G_U_F_M(0, ContentTypes.TEXT_PLAIN, queryDefinition));
  }
コード例 #2
0
  @Test
  public void testCountByG_U_F_M_StatusApproved() throws Exception {
    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_APPROVED);

    Assert.assertEquals(2, doCountBy_G_U_F_M(0, null, queryDefinition));
  }
コード例 #3
0
  @Test
  public void testCountByG_U_F_M_StatusInTrash() throws Exception {
    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_IN_TRASH, true);

    Assert.assertEquals(2, doCountBy_G_U_F_M(0, null, queryDefinition));
  }
コード例 #4
0
  @Test
  public void testCountByG_U_R_F_M_StatusAny_NewRepository() throws Exception {

    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_ANY);

    Assert.assertEquals(3, doCountBy_G_U_R_F_M_NewRepository(0, null, queryDefinition));
  }
コード例 #5
0
  @Test
  public void testCountByG_U_F_M_StatusInTrashByUserId() throws Exception {
    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_IN_TRASH, true);

    Assert.assertEquals(
        1, doCountBy_G_U_F_M(_defaultRepositoryFolder.getUserId(), null, queryDefinition));
  }
コード例 #6
0
  @Test
  public void testCountByG_U_F_M_StatusApprovedByMimeType_EmptyRepositories() throws Exception {

    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_APPROVED);

    Assert.assertEquals(
        2, doCountBy_G_U_R_F_M_EmptyRepositories(0, ContentTypes.TEXT_PLAIN, queryDefinition));
  }
コード例 #7
0
  @Test
  public void testCountByG_U_R_F_M_StatusAnyByMimeType_NewRepository() throws Exception {

    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_ANY);

    Assert.assertEquals(
        2, doCountBy_G_U_R_F_M_NewRepository(0, ContentTypes.TEXT_PLAIN, queryDefinition));
  }
コード例 #8
0
  @Test
  public void testCountByG_U_R_F_M_StatusAnyByUserId_EmptyRepositories() throws Exception {

    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_ANY);

    Assert.assertEquals(
        4,
        doCountBy_G_U_R_F_M_EmptyRepositories(
            _defaultRepositoryFolder.getUserId(), null, queryDefinition));
  }
コード例 #9
0
  @Test
  public void testCountByG_U_F_M_StatusApprovedByUserIdAndMimeType() throws Exception {

    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_APPROVED);

    Assert.assertEquals(
        0,
        doCountBy_G_U_F_M(
            _defaultRepositoryFolder.getUserId(), ContentTypes.TEXT_PLAIN, queryDefinition));
  }
コード例 #10
0
  @Test
  public void testCountByG_U_R_F_M_StatusApprovedByUserId_NewRepository() throws Exception {

    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_APPROVED);

    Assert.assertEquals(
        1,
        doCountBy_G_U_R_F_M_NewRepository(
            _defaultRepositoryFolder.getUserId(), null, queryDefinition));
  }
コード例 #11
0
  @Test
  public void testFindByG_U_F_M_StatusInTrash_EmptyRepositories() throws Exception {

    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_IN_TRASH, true);

    List<DLFileEntry> dlFileEntries =
        doFindBy_G_U_R_F_M_EmptyRepositories(0, ContentTypes.TEXT_PLAIN, queryDefinition);

    Assert.assertEquals(2, dlFileEntries.size());
  }
コード例 #12
0
  @Test
  public void testFindByG_U_F_M_StatusApproved_EmptyRepositories() throws Exception {

    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_APPROVED);

    List<DLFileEntry> dlFileEntries =
        doFindBy_G_U_R_F_M_EmptyRepositories(
            _defaultRepositoryFolder.getUserId(), null, queryDefinition);

    Assert.assertEquals(2, dlFileEntries.size());
  }
コード例 #13
0
  @Test
  public void testFindByG_U_F_M_StatusAny_BothRepositories() throws Exception {

    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_ANY);

    List<DLFileEntry> dlFileEntries =
        doFindBy_G_U_R_F_M_BothRepositories(
            _defaultRepositoryFolder.getUserId(), ContentTypes.TEXT_PLAIN, queryDefinition);

    Assert.assertEquals(2, dlFileEntries.size());
  }
コード例 #14
0
  @Test
  public void testCountByG_U_R_F_M_StatusInTrashByUserIdAndMimeType_NewRepository()
      throws Exception {

    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_IN_TRASH, true);

    Assert.assertEquals(
        0,
        doCountBy_G_U_R_F_M_NewRepository(
            _defaultRepositoryFolder.getUserId(), ContentTypes.TEXT_PLAIN, queryDefinition));
  }
コード例 #15
0
  @Test
  public void testFindByG_U_F_M_StatusInTrash() throws Exception {
    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_IN_TRASH, true);

    List<DLFileEntry> dlFileEntries = doFindBy_G_U_F_M(0, ContentTypes.TEXT_PLAIN, queryDefinition);

    Assert.assertEquals(1, dlFileEntries.size());

    DLFileEntry dlFileEntry = dlFileEntries.get(0);

    Assert.assertEquals("FE1.txt", dlFileEntry.getTitle());
  }
コード例 #16
0
  @Test
  public void testFindByG_U_F_M_StatusApproved_NewRepository() throws Exception {

    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_APPROVED);

    List<DLFileEntry> dlFileEntries =
        doFindBy_G_U_R_F_M_NewRepository(_newRepositoryFolder.getUserId(), null, queryDefinition);

    Assert.assertEquals(1, dlFileEntries.size());

    DLFileEntry dlFileEntry = dlFileEntries.get(0);

    Assert.assertEquals("FE2.pdf-NewRepository", dlFileEntry.getTitle());
  }
コード例 #17
0
  @Test
  public void testFindByG_U_F_M_StatusAny_NewRepository() throws Exception {
    QueryDefinition<DLFileEntry> queryDefinition = new QueryDefinition<>();

    queryDefinition.setStatus(WorkflowConstants.STATUS_ANY);

    List<DLFileEntry> dlFileEntries =
        doFindBy_G_U_R_F_M_NewRepository(
            _newRepositoryFolder.getUserId(), ContentTypes.TEXT_PLAIN, queryDefinition);

    Assert.assertEquals(1, dlFileEntries.size());

    DLFileEntry dlFileEntry = dlFileEntries.get(0);

    Assert.assertEquals("FE3.txt", dlFileEntry.getDescription());
  }