Package org.candlepin.model

Examples of org.candlepin.model.Owner


    @Before
    @Override
    public void init() {
        super.init();
        this.curator = this.injector.getInstance(GuestIdCurator.class);
        owner = new Owner("test-owner", "Test Owner");
        owner = ownerCurator.create(owner);
        ct = new ConsumerType(ConsumerTypeEnum.SYSTEM);
        ct = consumerTypeCurator.create(ct);
    }
View Full Code Here


        return r;
    }

    @Test
    public void testListForOwner() {
        Owner o2 = createOwner();

        Role r1 = createRole(owner);
        createRole(o2);

        List<Role> roles = roleCurator.listForOwner(owner);
View Full Code Here

    private Owner owner;
    private ConsumerType ct;

    @Before
    public void setUp() {
        owner = new Owner("test-owner", "Test Owner");
        owner = ownerCurator.create(owner);
        ct = new ConsumerType(ConsumerTypeEnum.SYSTEM);
        ct = consumerTypeCurator.create(ct);

        CandlepinCommonTestConfig config =
View Full Code Here

        Map<String, String> otherFacts = new HashMap<String, String>();
        otherFacts.put("key", "val");
        otherConsumer.setFacts(otherFacts);
        otherConsumer = consumerCurator.create(otherConsumer);

        Owner otherOwner = new Owner("test-owner1", "Test Owner1");
        otherOwner = ownerCurator.create(otherOwner);
        Consumer otherOwnCons = new Consumer("testConsumer3", "testUser3", otherOwner, ct);
        Map<String, String> otherOwnFacts = new HashMap<String, String>();
        otherOwnFacts.put("key", "val");
        otherOwnCons.setFacts(otherOwnFacts);
View Full Code Here

*/
public class OwnerCuratorTest extends DatabaseTestFixture {

    @Test
    public void basicImport() {
        Owner owner = new Owner("testing");
        owner.setId("testing-primary-key");

        this.ownerCurator.replicate(owner);

        assertEquals("testing",
                this.ownerCurator.find("testing-primary-key").getKey());
View Full Code Here

                this.ownerCurator.find("testing-primary-key").getKey());
    }

    @Test(expected = RollbackException.class)
    public void primaryKeyCollision() {
        Owner owner = new Owner("dude");
        owner = this.ownerCurator.create(owner);

        Owner newOwner = new Owner("someoneElse");
        newOwner.setId(owner.getId());

        this.ownerCurator.replicate(newOwner);
    }
View Full Code Here

    @Test(expected = PersistenceException.class)
    public void upstreamUuidConstraint() {
        UpstreamConsumer uc = new UpstreamConsumer("sameuuid");

        Owner owner1 = new Owner("owner1");
        owner1.setUpstreamConsumer(uc);
        Owner owner2 = new Owner("owner2");
        owner2.setUpstreamConsumer(uc);

        ownerCurator.create(owner1);
        ownerCurator.create(owner2);
    }
View Full Code Here

        entitlementCurator.create(ent);
    }

    @Test
    public void testLookupMultipleOwnersByMultipleActiveProducts() {
        Owner owner = createOwner();
        Owner owner2 = createOwner();

        Product product = TestUtil.createProduct();
        Product provided = TestUtil.createProduct();
        Product product2 = TestUtil.createProduct();
        Product provided2 = TestUtil.createProduct();
View Full Code Here

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

    @Test
    public void testLookupOwnerByActiveProduct() {
        Owner owner = createOwner();

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

        assertEquals(owner, results.get(0));
    }

    @Test
    public void testLookupOwnersByActiveProductWithExpiredEntitlements() {
        Owner owner = createOwner();

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

TOP

Related Classes of org.candlepin.model.Owner

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.