Package org.jboss.aerogear.unifiedpush.api

Examples of org.jboss.aerogear.unifiedpush.api.Category


        assertThat(queriedVariant.getGoogleKey()).isEqualTo("KEY");

        Installation androidInstallation1 = new Installation();
        androidInstallation1.setDeviceToken("1234543212232301234567890012345678900123456789001234567890012345678900123456789001234567890012345678");
        final HashSet<Category> categories = new HashSet<Category>();
        categories.add(new Category("X"));
        categories.add(new Category("Y"));
        androidInstallation1.setCategories(categories);
        installationDao.create(androidInstallation1);

        androidInstallation1.setVariant(queriedVariant);
        variantDao.update(queriedVariant);
View Full Code Here


        entityManager.close();
    }

    private void createTestData(EntityManager entityManager) {
        Category cat1 = new Category("cat1");
        Category cat2 = new Category("cat2");
        Category cat3 = new Category("cat3");

        entityManager.persist(cat1);
        entityManager.persist(cat2);
        entityManager.persist(cat3);
    }
View Full Code Here

        // when
        final List<Category> names = categoryDao.findByNames(categoryNames);

        // then
        assertThat(names).hasSize(2).contains(new Category("cat1"), new Category("cat2"));
    }
View Full Code Here

        Installation android1 = new Installation();
        android1.setAlias("foo@bar.org");
        android1.setDeviceToken(DEVICE_TOKEN_1);
        android1.setDeviceType("Android Phone");
        final Set<Category> categoriesOne = new HashSet<Category>();
        categoriesOne.add(new Category("soccer"));
        android1.setCategories(categoriesOne);

        installationDao.create(android1);

        Installation android2 = new Installation();
        android2.setAlias("foo@bar.org");
        android2.setDeviceToken(DEVICE_TOKEN_2);
        android2.setDeviceType("Android Tablet");
        final Set<Category> categoriesTwo = new HashSet<Category>();
        categoriesTwo.add(new Category("news"));
        android2.setCategories(categoriesTwo);

        installationDao.create(android2);

        // disabled
View Full Code Here

        final SimplePushVariant variant = new SimplePushVariant();
        entityManager.persist(variant);

        final Installation installation = new Installation();
        installation.setDeviceToken("http://test");
        installation.setCategories(new HashSet<Category>(Arrays.asList(new Category("one"), new Category("two"))));

        final Installation installation2 = new Installation();
        installation2.setDeviceToken("http://test2");
        installation2.setCategories(new HashSet<Category>(Arrays.asList(new Category("one"), new Category("three"))));

        installation.setVariant(variant);
        installation2.setVariant(variant);

        //when
View Full Code Here

        Installation android1 = new Installation();
        android1.setAlias("foo@bar.org");
        android1.setDeviceToken(DEVICE_TOKEN_1);
        android1.setDeviceType("Android Phone");
        final Set<Category> categoriesOne = new HashSet<Category>();
        final Category category = entityManager.createQuery("from Category where name = :name", Category.class)
                .setParameter("name", "soccer").getSingleResult();
        categoriesOne.add(category);
        android1.setCategories(categoriesOne);
        final String id = android1.getId();
View Full Code Here

TOP

Related Classes of org.jboss.aerogear.unifiedpush.api.Category

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.