use of org.candlepin.policy.js.compliance.ComplianceStatus in project candlepin by candlepin.
the class ComplianceStatusHasherTest method ensureDifferentHashWhenEntitlementPoolChanges.
@Test
public void ensureDifferentHashWhenEntitlementPoolChanges() {
Consumer consumer = createConsumer(owner);
ComplianceStatus testStatus = createInitialStatus(consumer);
assertEquals(initialHash, generateHash(testStatus, consumer));
Entitlement ent = consumer.getEntitlements().iterator().next();
Pool pool = ent.getPool();
String poolId = pool.getId();
Date poolStartDate = pool.getStartDate();
Date poolEndDate = pool.getEndDate();
}
use of org.candlepin.policy.js.compliance.ComplianceStatus in project candlepin by candlepin.
the class ComplianceStatusHasherTest method ensureDifferentHashWhenCompliantProductEntitlementCountChanges.
@Test
public void ensureDifferentHashWhenCompliantProductEntitlementCountChanges() {
Consumer consumer = createConsumer(owner);
ComplianceStatus testStatus = createInitialStatus(consumer);
assertEquals(initialHash, generateHash(testStatus, consumer));
Entitlement ent = createEntitlement(Calendar.getInstance(), owner, consumer, "test-ent");
HashSet<Entitlement> ents = new HashSet<>();
ents.add(ent);
testStatus.getCompliantProducts().put(ent.getPool().getProductId(), ents);
assertNotEquals(initialHash, generateHash(testStatus, consumer));
}
Aggregations