Search in sources :

Example 26 with Branding

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

the class PoolRulesTest method brandingDidntChange.

@Test
public void brandingDidntChange() {
    Pool p = TestUtil.createPool(owner, TestUtil.createProduct());
    // Add some branding to the subscription and do an update:
    Branding b1 = new Branding("8000", "OS", "Awesome OS Branded");
    Branding b2 = new Branding("8001", "OS", "Awesome OS Branded 2");
    p.getBranding().add(b1);
    p.getBranding().add(b2);
    // Copy the pool with the branding to begin with:
    Pool p1 = TestUtil.clone(p);
    List<Pool> existingPools = Arrays.asList(p1);
    List<PoolUpdate> updates = this.poolRules.updatePools(p, existingPools, p.getQuantity(), Collections.<String, Product>emptyMap());
    assertEquals(0, updates.size());
}
Also used : Pool(org.candlepin.model.Pool) Branding(org.candlepin.model.Branding) PoolUpdate(org.candlepin.policy.js.pool.PoolUpdate) Test(org.junit.Test)

Aggregations

Branding (org.candlepin.model.Branding)26 Pool (org.candlepin.model.Pool)15 Product (org.candlepin.model.Product)14 HashSet (java.util.HashSet)9 Entitlement (org.candlepin.model.Entitlement)9 SourceSubscription (org.candlepin.model.SourceSubscription)8 Test (org.junit.Test)7 Owner (org.candlepin.model.Owner)6 Date (java.util.Date)5 Consumer (org.candlepin.model.Consumer)5 ProvidedProduct (org.candlepin.model.ProvidedProduct)5 SubscriptionsCertificate (org.candlepin.model.SubscriptionsCertificate)5 CertificateSerial (org.candlepin.model.CertificateSerial)4 ArrayList (java.util.ArrayList)3 HashMap (java.util.HashMap)3 SourceStack (org.candlepin.model.SourceStack)3 ProductData (org.candlepin.model.dto.ProductData)3 Subscription (org.candlepin.model.dto.Subscription)3 LinkedList (java.util.LinkedList)2 EntitlementDTO (org.candlepin.dto.manifest.v1.EntitlementDTO)2