Package org.candlepin.model

Examples of org.candlepin.model.Product.addAttribute()


    public void testSupportCasing() {
        Product product1 = TestUtil.createProduct();
        product1.addAttribute(new ProductAttribute("support_level", "premium"));
        productCurator.create(product1);
        Product product2 = TestUtil.createProduct();
        product2.addAttribute(new ProductAttribute("support_level", "Premium"));
        productCurator.create(product2);
        Product product3 = TestUtil.createProduct();
        product3.addAttribute(new ProductAttribute("support_level", "Premiums"));
        productCurator.create(product3);
View Full Code Here


        productCurator.create(product1);
        Product product2 = TestUtil.createProduct();
        product2.addAttribute(new ProductAttribute("support_level", "Premium"));
        productCurator.create(product2);
        Product product3 = TestUtil.createProduct();
        product3.addAttribute(new ProductAttribute("support_level", "Premiums"));
        productCurator.create(product3);

        Pool pool1 = createPoolAndSub(owner, product1, 100L,
            TestUtil.createDate(2000, 3, 2), TestUtil.createDate(2055, 3, 2));
        poolCurator.create(pool1);
View Full Code Here

    }

    @Test
    public void testListForSufficientCoresList() {
        Product product = new Product(productId, "A product for testing");
        product.addAttribute(new ProductAttribute("cores", "10"));
        Pool pool = createPool(owner, product);

        consumer.setFacts(new HashMap<String, String>());
        consumer.setFact("cpu.cpu_socket(s)", "1");
        consumer.setFact("cpu.core(s)_per_socket", "10");
View Full Code Here

    }

    @Test
    public void testListForSufficientCores() {
        Product product = new Product(productId, "A product for testing");
        product.addAttribute(new ProductAttribute("cores", "10"));
        Pool pool = createPool(owner, product);

        consumer.setFacts(new HashMap<String, String>());
        consumer.setFact("cpu.cpu_socket(s)", "1");
        consumer.setFact("cpu.core(s)_per_socket", "10");
View Full Code Here

    }

    @Test
    public void testListForInsufficientCores() {
        Product product = new Product(productId, "A product for testing");
        product.addAttribute(new ProductAttribute("cores", "10"));
        Pool pool = createPool(owner, product);

        consumer.setFacts(new HashMap<String, String>());
        consumer.setFact("cpu.cpu_socket(s)", "2");
        consumer.setFact("cpu.core(s)_per_socket", "10");
View Full Code Here

    }

    @Test
    public void testListForSufficientRAM() {
        Product product = new Product(productId, "A product for testing");
        product.addAttribute(new ProductAttribute("ram", "16"));
        Pool pool = createPool(owner, product);

        consumer.setFacts(new HashMap<String, String>());
        consumer.setFact("memory.memtotal", "16777216");
View Full Code Here

    }

    @Test
    public void testListForInsufficientRAM() {
        Product product = new Product(productId, "A product for testing");
        product.addAttribute(new ProductAttribute("ram", "10"));
        Pool pool = createPool(owner, product);

        consumer.setFacts(new HashMap<String, String>());
        consumer.setFact("memory.memtotal", "16777216");
View Full Code Here

    }

    @Test
    public void testListForSufficientSockets() {
        Product product = new Product(productId, "A product for testing");
        product.addAttribute(new ProductAttribute("sockets", "2"));
        Pool pool = createPool(owner, product);

        consumer.setFacts(new HashMap<String, String>());
        consumer.setFact("cpu.cpu_socket(s)", "1");
View Full Code Here

    }

    @Test
    public void testListForInsufficientSockets() {
        Product product = new Product(productId, "A product for testing");
        product.addAttribute(new ProductAttribute("sockets", "2"));
        Pool pool = createPool(owner, product);

        consumer.setFacts(new HashMap<String, String>());
        consumer.setFact("cpu.cpu_socket(s)", "4");
View Full Code Here

    }

    @Test
    public void testBindFromSameProductAllowedWithMultiEntitlementAttribute() {
        Product product = new Product(productId, "A product for testing");
        product.addAttribute(new ProductAttribute("multi-entitlement", "yes"));
        Pool pool = createPool(owner, product);

        Entitlement e = new Entitlement(pool, consumer, 1);
        consumer.addEntitlement(e);
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.