Package org.candlepin.policy

Examples of org.candlepin.policy.ValidationError


        assertFalse(vr.getErrors().isEmpty());
    }

    @Test
    public void addError() {
        ValidationError ve = mock(ValidationError.class);
        vr.addError(ve);
        assertFalse(vr.getErrors().isEmpty());
        assertEquals(ve, vr.getErrors().get(0));
    }
View Full Code Here


    private ConsumerCurator cc;
    private EntitlementRulesTranslator translator;

    private ValidationResult fakeOutResult(String msg) {
        ValidationResult result = new ValidationResult();
        ValidationError err = new ValidationError(msg);
        result.addError(err);
        return result;
    }
View Full Code Here

    private void finishValidation(ValidationResult result, Pool pool, Integer quantity) {
        validatePoolQuantity(result, pool, quantity);
        if (pool.isExpired(dateSource)) {
            result.addError(
                new ValidationError(i18n.tr("Subscriptions for {0} expired on: {1}",
                    pool.getProductId(),
                    pool.getEndDate())));
        }
    }
View Full Code Here

TOP

Related Classes of org.candlepin.policy.ValidationError

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.