Package org.candlepin.policy

Examples of org.candlepin.policy.ValidationWarning


*/
public class ValidationWarningTest {

    @Test
    public void getKey() {
        ValidationWarning vw = new ValidationWarning("foobarbaz");
        assertEquals("foobarbaz", vw.getResourceKey());
    }
View Full Code Here


        assertEquals("foobarbaz", vw.getResourceKey());
    }

    @Test
    public void testToString() {
        ValidationWarning vw = new ValidationWarning("foobarbaz");
        assertEquals("foobarbaz", vw.toString());

    }
View Full Code Here

        assertTrue(vr.getWarnings().isEmpty());
    }

    @Test
    public void addWarning() {
        ValidationWarning vw = mock(ValidationWarning.class);
        vr.addWarning(vw);
        assertFalse(vr.getWarnings().isEmpty());
        assertEquals(vw, vr.getWarnings().get(0));
    }
View Full Code Here

        Pool p = TestUtil.createPool(prod);

        ValidationResult results = enforcer.preEntitlement(c, p, 1, CallerType.LIST_POOLS);
        assertNotNull(results);
        assertEquals(0, results.getErrors().size());
        ValidationWarning warning = results.getWarnings().get(0);
        assertEquals("rulewarning.cores.unsupported.by.consumer", warning.getResourceKey());
    }
View Full Code Here

        Pool p = TestUtil.createPool(prod);

        ValidationResult results = enforcer.preEntitlement(c, p, 1, CallerType.LIST_POOLS);
        assertNotNull(results);
        assertEquals(0, results.getErrors().size());
        ValidationWarning warning = results.getWarnings().get(0);
        assertEquals("rulewarning.ram.unsupported.by.consumer", warning.getResourceKey());
    }
View Full Code Here

        Pool p = TestUtil.createPool(prod);

        ValidationResult results = enforcer.preEntitlement(c, p, 1, CallerType.LIST_POOLS);
        assertNotNull(results);
        assertEquals(0, results.getErrors().size());
        ValidationWarning warning = results.getWarnings().get(0);
        assertEquals("rulewarning.instance.unsupported.by.consumer",
            warning.getResourceKey());
    }
View Full Code Here

        ValidationResult results = enforcer.preEntitlement(c, p, 1, CallerType.LIST_POOLS);
        assertNotNull(results);
        assertEquals(1, results.getWarnings().size());
        assertTrue(results.getErrors().isEmpty());

        ValidationWarning warning = results.getWarnings().get(0);
        assertEquals("rulewarning.derivedproduct.unsupported.by.consumer",
            warning.getResourceKey());
    }
View Full Code Here

TOP

Related Classes of org.candlepin.policy.ValidationWarning

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.