示例#1
0
  @Test
  public void getApplicationVersionByUserApplicationAppState() {
    User user = getUser(UserRole.ROLE_ORG_ADMIN, UserRole.ROLE_GROUP_USER);
    user = userService.getByEmail(user.getEmail());

    List<ApplicationVersion> applicationVersions = userService.getApplicationVersions(user);
    for (ApplicationVersion applicationVersion : applicationVersions) {
      applicationVersions =
          userService.getApplicationVersions(
              user,
              applicationVersion.getApplication().getId(),
              SortOrder.ASCENDING,
              AppState.ORGANIZATION_PUBLISH,
              AppState.GROUP_PUBLISH);
      assertTrue(applicationVersions.size() == 1);
    }
  }
示例#2
0
  @Test
  public void getApplicationVersionsByUserTest() {
    User user = getUser(UserRole.ROLE_ORG_ADMIN, UserRole.ROLE_GROUP_USER);
    user = userService.getByEmail(user.getEmail());

    List<ApplicationVersion> applicationVersions = userService.getApplicationVersions(user);
    assertTrue(applicationVersions.size() == 2);
  }