Package org.candlepin.model

Examples of org.candlepin.model.ConsumerType


    }

    @Test
    public void testCreate() {
        Consumer newConsumer = new Consumer("consumername", "user", owner,
            new ConsumerType("system"));
        consumerTypeCurator.create(newConsumer.getType());
        consumerCurator.create(newConsumer);

        setupPrincipal(owner, Access.ALL);
        EventFactory eventFactory = injector.getInstance(EventFactory.class);
View Full Code Here


    @Test
    public void testSecondarySorting() {

        Consumer newConsumer = new Consumer("consumername", "user", owner,
                new ConsumerType("system"));
        consumerTypeCurator.create(newConsumer.getType());
        consumerCurator.create(newConsumer);

        setupPrincipal(owner, Access.ALL);
        EventFactory eventFactory = injector.getInstance(EventFactory.class);
View Full Code Here

    @Test
    public void testSomething() {
        beginTransaction();

        ConsumerType ct = new ConsumerType("standard-system");
        entityManager().persist(ct);

        commitTransaction();

        List<?> results = entityManager().createQuery(
View Full Code Here

        assertEquals(1, results.size());
    }

    @Test
    public void testIsType() {
        ConsumerType ct = new ConsumerType("system");

        assertTrue(ct.isType(ConsumerType.ConsumerTypeEnum.SYSTEM));
    }
View Full Code Here

        assertTrue(ct.isType(ConsumerType.ConsumerTypeEnum.SYSTEM));
    }

    @Test
    public void testEquals() {
        ConsumerType ct = new ConsumerType("system");
        ConsumerType ct1 = new ConsumerType("system");
        ConsumerType ct2 = new ConsumerType("fake");

        assertTrue(ct.equals(ct1));
        assertFalse(ct.equals(ct2));
        assertFalse(ct.equals(1));
View Full Code Here

    @Test
    public void bidirectionalConsumers() throws Exception {
        beginTransaction();
        Owner o = createOwner();
        ConsumerType consumerType = TestUtil.createConsumerType();
        Consumer c1 = TestUtil.createConsumer(consumerType, o);
        Consumer c2 = TestUtil.createConsumer(consumerType, o);
        o.addConsumer(c1);
        o.addConsumer(c2);
View Full Code Here

    }

    @Test
    public void objectMapper() {
        Owner o = createOwner();
        ConsumerType consumerType = TestUtil.createConsumerType();
        Consumer c1 = TestUtil.createConsumer(consumerType, o);
        Consumer c2 = TestUtil.createConsumer(consumerType, o);
        o.addConsumer(c1);
        o.addConsumer(c2);
        Set<Consumer> consumers = o.getConsumers();
View Full Code Here

    @Before
    public void setUp() {
        owner = createOwner();
        ownerCurator.create(owner);

        ConsumerType systemType = new ConsumerType(ConsumerTypeEnum.SYSTEM);
        consumerTypeCurator.create(systemType);

        ConsumerType ueberCertType = new ConsumerType(ConsumerTypeEnum.UEBER_CERT);
        consumerTypeCurator.create(ueberCertType);

        product = TestUtil.createProduct();
        productCurator.create(product);
View Full Code Here

    public void setUpTestObjects() {
        owner = new Owner("Example Corporation");

        ownerCurator.create(owner);

        consumerType = new ConsumerType(CONSUMER_TYPE_NAME);
        consumerTypeCurator.create(consumerType);
    }
View Full Code Here

    @Before
    public void setUp() {
        owner = new Owner("test-owner", "Test Owner");
        owner = ownerCurator.create(owner);
        ct = new ConsumerType(ConsumerTypeEnum.SYSTEM);
        ct = consumerTypeCurator.create(ct);
        consumer = new Consumer("a consumer", "username", owner, ct);
        consumerCurator.create(consumer);
    }
View Full Code Here

TOP

Related Classes of org.candlepin.model.ConsumerType

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.