예제 #1
0
 @Test
 public void getApplicationsByUserApplicationTypeAppStates() {
   User user = getUser(UserRole.ROLE_ORG_USER, UserRole.ROLE_GROUP_USER);
   user = userService.getByEmail(user.getEmail());
   List<Application> applications =
       userService.getApplicationsForUser(user, ApplicationType.ANDROID, AppState.GROUP_PUBLISH);
   assertTrue(applications.size() == 1);
 }
예제 #2
0
 @Test
 public void getApplicationsByUserApplicationTypeCategoryAppStatesTest() {
   User user = getUser(UserRole.ROLE_ORG_USER, UserRole.ROLE_GROUP_USER);
   user = userService.getByEmail(user.getEmail());
   Organization organization = organizationService.getAll().get(0);
   Category category = organization.getCategories().get(0);
   List<Application> applications =
       userService.getApplicationsForUser(
           user, ApplicationType.ANDROID, category.getId(), AppState.GROUP_PUBLISH);
   assertTrue(applications.size() == 1);
 }