コード例 #1
0
ファイル: UserServiceIT.java プロジェクト: shaan360/knappsack
  private Category createCategory(Organization organization) {
    Category category = new Category();
    category.setName("Test Category");
    category.setOrganization(organization);

    return category;
  }
コード例 #2
0
ファイル: UserServiceIT.java プロジェクト: shaan360/knappsack
 @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);
 }