Package org.candlepin.policy.js.pool

Examples of org.candlepin.policy.js.pool.PoolUpdate


    @Test
    public void virtLimitFromLastVirtLimitEntWhenFirstIsRemoved() {
        stackedEnts.clear();
        stackedEnts.add(createEntFromPool(pool1));
        stackedEnts.add(createEntFromPool(pool2));
        PoolUpdate update = poolRules.updatePoolFromStack(stackDerivedPool);
        assertEquals((Long) 2L, stackDerivedPool.getQuantity());

        stackedEnts.remove(0);
        update = poolRules.updatePoolFromStack(stackDerivedPool);
        assertTrue(update.changed());
        assertTrue(update.getQuantityChanged());
        assertEquals(new Long("-1"), stackDerivedPool.getQuantity());
    }
View Full Code Here


            "testattr2", "2", pool1.getProductId()));

        stackedEnts.clear();
        stackedEnts.add(createEntFromPool(pool1));
        stackedEnts.add(createEntFromPool(pool2));
        PoolUpdate update = poolRules.updatePoolFromStack(stackDerivedPool);
        assertEquals(new Long("-1"), stackDerivedPool.getQuantity());

        stackedEnts.remove(0);
        update = poolRules.updatePoolFromStack(stackDerivedPool);
        assertTrue(update.changed());
        assertTrue(update.getDatesChanged());
        assertFalse(update.getQuantityChanged());
        assertEquals(new Long("-1"), stackDerivedPool.getQuantity());
    }
View Full Code Here

            // stack id, because we cannot look it up by subscriptionId
            List<Pool> subPools = getOwnerSubPoolsForStackId(
                sub.getOwner(), sub.getStackId());

            for (Pool subPool : subPools) {
                PoolUpdate update = updatePoolFromStack(subPool);

                if (update.changed()) {
                    updatedPools.add(update);
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.candlepin.policy.js.pool.PoolUpdate

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.