Package org.candlepin.model

Examples of org.candlepin.model.ProductAttribute


    }

    @Test
    public void testProductAttributeCreationSuccessZeroInt() {
        Product original = createTestProduct();
        original.addAttribute(new ProductAttribute("product.pos_count", "0"));
        productCurator.create(original);
    }
View Full Code Here


    }

    @Test(expected = BadRequestException.class)
    public void testProductAttributeCreationFailBadPosInt() {
        Product original = createTestProduct();
        original.addAttribute(new ProductAttribute("product.pos_count", "-5"));
        productCurator.create(original);
    }
View Full Code Here

    }

    @Test(expected = BadRequestException.class)
    public void testProductAttributeCreationFailBadLong() {
        Product original = createTestProduct();
        original.addAttribute(new ProductAttribute("product.long_multiplier",
            "ZZ"));
        productCurator.create(original);
    }
View Full Code Here

    }

    @Test(expected = BadRequestException.class)
    public void testProductAttributeCreationFailBadPosLong() {
        Product original = createTestProduct();
        original.addAttribute(new ProductAttribute("product.long_pos_count",
            "-1"));
        productCurator.create(original);
    }
View Full Code Here

    }

    @Test(expected = BadRequestException.class)
    public void testProductAttributeCreationFailBadStringBool() {
        Product original = createTestProduct();
        original.addAttribute(new ProductAttribute("product.bool_val_str", "yes"));
        productCurator.create(original);
    }
View Full Code Here

    }

    @Test(expected = BadRequestException.class)
    public void testProductAttributeCreationFailNumberBool() {
        Product original = createTestProduct();
        original.addAttribute(new ProductAttribute("product.bool_val_num", "2"));
        productCurator.create(original);
    }
View Full Code Here

    @Test(expected = BadRequestException.class)
    public void testProductAttributeUpdateFailInt() {
        Product original = createTestProduct();
        productCurator.create(original);
        assertTrue(original.getId() != null);
        original.addAttribute(new ProductAttribute("product.count", "one"));
        productCurator.createOrUpdate(original);
    }
View Full Code Here

    @Test(expected = BadRequestException.class)
    public void testProductAttributeUpdateFailPosInt() {
        Product original = createTestProduct();
        productCurator.create(original);
        assertTrue(original.getId() != null);
        original.addAttribute(new ProductAttribute("product.pos_count", "-44"));
        productCurator.createOrUpdate(original);
    }
View Full Code Here

    @Test
    public void testProductAttributeUpdateSuccessZeroInt() {
        Product original = createTestProduct();
        productCurator.create(original);
        assertTrue(original.getId() != null);
        original.addAttribute(new ProductAttribute("product.pos_count", "0"));
        productCurator.createOrUpdate(original);
    }
View Full Code Here

    @Test(expected = BadRequestException.class)
    public void testProductAttributeUpdateFailLong() {
        Product original = createTestProduct();
        productCurator.create(original);
        assertTrue(original.getId() != null);
        original.addAttribute(new ProductAttribute("product.long_multiplier",
            "10^23"));
        productCurator.createOrUpdate(original);
    }
View Full Code Here

TOP

Related Classes of org.candlepin.model.ProductAttribute

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.