Package org.candlepin.resource

Examples of org.candlepin.resource.ActivationKeyResource.addPoolToKey()


        ActivationKeyResource akr = new ActivationKeyResource(
            akc, i18n, poolManager, serviceLevelValidator, activationKeyRules, null);
        akr.addPoolToKey("testKey", "testPool1", 1L);
        assertEquals(1, ak.getPools().size());
        ak.addPool(p1, 1L);
        akr.addPoolToKey("testKey", "testPool2", 1L);
        assertEquals(3, ak.getPools().size());
    }

    @Test
    public void testActivationKeyWithNullQuantity() {
View Full Code Here


        when(akc.verifyAndLookupKey(eq("testKey"))).thenReturn(ak);
        when(poolManager.find(eq("testPool"))).thenReturn(p);

        ActivationKeyResource akr = new ActivationKeyResource(
            akc, i18n, poolManager, serviceLevelValidator, activationKeyRules, null);
        akr.addPoolToKey("testKey", "testPool", null);
    }

    @Test(expected = BadRequestException.class)
    public void testUpdateTooLongRelease() {
        ActivationKey key = new ActivationKey();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.