Package org.candlepin.policy.js.pooltype

Examples of org.candlepin.policy.js.pooltype.PoolComplianceType


        suggested.setIncrement(1L);
        when(quantityRules.getSuggestedQuantity(any(Pool.class),
            any(Consumer.class), any(Date.class))).
            thenReturn(suggested);

        PoolComplianceType pt = new PoolComplianceType();
        pt.setRawPoolType("unknown");
        pt.translatePoolType(i18n);
        when(poolTypeRules.getPoolType(any(Pool.class))).
            thenReturn(pt);

        Date date = new Date();
        Map<String, String> attrs =
View Full Code Here


        when(quantityRules.getSuggestedQuantity(any(Pool.class),
            any(Consumer.class), any(Date.class))).
            thenReturn(suggested);

        when(poolTypeRules.getPoolType(any(Pool.class))).
            thenReturn(new PoolComplianceType());

        Date date = new Date();
        Map<String, String> attrs =
            attrUtil.buildCalculatedAttributes(pool2, consumer, date);
        assertEquals("12", attrs.get("quantity_increment"));
View Full Code Here

    }

    public Map<String, String> buildCalculatedAttributes(Pool p, Consumer c, Date date) {
        Map<String, String> attrMap = new HashMap<String, String>();

        PoolComplianceType type = poolTypeRules.getPoolType(p);
        type.translatePoolType(i18n);
        attrMap.put("compliance_type", type.getPoolType());

        if (c == null) {
            return attrMap;
        }
View Full Code Here

TOP

Related Classes of org.candlepin.policy.js.pooltype.PoolComplianceType

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.