Search in sources :

Example 66 with ConsumerInstalledProduct

use of org.candlepin.model.ConsumerInstalledProduct in project candlepin by candlepin.

the class ActiveEntitlementJobTest method setUp.

@Before
public void setUp() {
    owner = new Owner("test-owner", "Test Owner");
    owner = ownerCurator.create(owner);
    prod = this.createProduct("1", "2", owner);
    ct = new ConsumerType(ConsumerTypeEnum.SYSTEM);
    ct = consumerTypeCurator.create(ct);
    consumer = new Consumer("a consumer", "username", owner, ct);
    consumer.addInstalledProduct(new ConsumerInstalledProduct(prod.getId(), prod.getName()));
    consumerCurator.create(consumer);
}
Also used : Owner(org.candlepin.model.Owner) Consumer(org.candlepin.model.Consumer) ConsumerInstalledProduct(org.candlepin.model.ConsumerInstalledProduct) ConsumerType(org.candlepin.model.ConsumerType) Before(org.junit.Before)

Aggregations

ConsumerInstalledProduct (org.candlepin.model.ConsumerInstalledProduct)66 Consumer (org.candlepin.model.Consumer)54 Product (org.candlepin.model.Product)51 Test (org.junit.Test)49 Owner (org.candlepin.model.Owner)44 Date (java.util.Date)35 DateRange (org.candlepin.policy.js.compliance.DateRange)26 HashSet (java.util.HashSet)14 ArrayList (java.util.ArrayList)13 Entitlement (org.candlepin.model.Entitlement)11 Pool (org.candlepin.model.Pool)11 ConsumerType (org.candlepin.model.ConsumerType)10 AutobindData (org.candlepin.resource.dto.AutobindData)10 HashMap (java.util.HashMap)8 ConsumerCapability (org.candlepin.model.ConsumerCapability)7 List (java.util.List)6 ProductData (org.candlepin.model.dto.ProductData)6 ConsumerInstalledProductDTO (org.candlepin.dto.api.v1.ConsumerInstalledProductDTO)4 Environment (org.candlepin.model.Environment)4 GuestId (org.candlepin.model.GuestId)4