Package org.apache.geronimo.system.configuration.condition

Examples of org.apache.geronimo.system.configuration.condition.JexlExpressionParser


        AttributeType attributeType = (AttributeType) copiedGBeanType.getAttributeOrReference().get(0);
        assertNull(attributeType.getPropertyEditor());
    }
   
    public void testPropertyEditorIsNotDefinedForPrimitives() throws Exception {
        GBeanOverride override = new GBeanOverride(gbeanType, new JexlExpressionParser());
        override.setAttribute(attributeName, new Integer(1), int.class.getName(), getClass().getClassLoader());
       
        GbeanType copiedGBeanType = override.writeXml();
        assertEquals(1, copiedGBeanType.getAttributeOrReference().size());
        AttributeType attributeType = (AttributeType) copiedGBeanType.getAttributeOrReference().get(0);
View Full Code Here


        AttributeType attributeType = (AttributeType) copiedGBeanType.getAttributeOrReference().get(0);
        assertNull(attributeType.getPropertyEditor());
    }
   
    public void testPropertyEditorIsNotDefinedForCollectionSubClasses() throws Exception {
        GBeanOverride override = new GBeanOverride(gbeanType, new JexlExpressionParser());
        override.setAttribute(attributeName, Collections.singleton("test"), Collection.class.getName(), getClass().getClassLoader());
       
        GbeanType copiedGBeanType = override.writeXml();
        assertEquals(1, copiedGBeanType.getAttributeOrReference().size());
        AttributeType attributeType = (AttributeType) copiedGBeanType.getAttributeOrReference().get(0);
View Full Code Here

    }
   
    public void testReferences() throws Exception {
        GBeanOverride override;
       
        override = new GBeanOverride(gbeanType, new JexlExpressionParser());       
        override.setClearReference("foo");
        override.setReferencePatterns("foo", new ReferencePatterns(new AbstractName(new URI("/foo/bar/car?foo=bar"))));
        override.writeXml();
       
        assertFalse(override.isClearReference("foo"));
        assertFalse(override.getClearReferences().contains("foo"));       
        assertTrue(override.getReferencePatterns("foo") != null);
        assertTrue(override.getReferences().containsKey("foo"));
       
        override = new GBeanOverride(gbeanType, new JexlExpressionParser());  
        override.setReferencePatterns("foo", new ReferencePatterns(new AbstractName(new URI("/foo/bar/car?foo=bar"))));       
        override.setClearReference("foo");
        override.writeXml();
       
        assertTrue(override.isClearReference("foo"));
View Full Code Here

    }
   
    public void testAttributes() throws Exception {
        GBeanOverride override;
       
        override = new GBeanOverride(gbeanType, new JexlExpressionParser());
        override.setNullAttribute("foo");
        override.setClearAttribute("foo");
        override.setAttribute("foo", "bar");
        override.writeXml();
       
        assertFalse(override.isNullAttribute("foo"));
        assertFalse(override.getNullAttributes().contains("foo"));   
        assertFalse(override.isClearAttribute("foo"));
        assertFalse(override.getClearAttributes().contains("foo"))
        assertTrue(override.getAttribute("foo") != null);
        assertTrue(override.getAttributes().containsKey("foo"));
           
        override = new GBeanOverride(gbeanType, new JexlExpressionParser());
        override.setAttribute("foo", "bar");
        override.setNullAttribute("foo");
        override.setClearAttribute("foo");
        override.writeXml();
       
        assertFalse(override.isNullAttribute("foo"));
        assertFalse(override.getNullAttributes().contains("foo"));   
        assertFalse(override.getAttribute("foo") != null);
        assertFalse(override.getAttributes().containsKey("foo"));       
        assertTrue(override.isClearAttribute("foo"));
        assertTrue(override.getClearAttributes().contains("foo"))
       
        override = new GBeanOverride(gbeanType, new JexlExpressionParser());
        override.setClearAttribute("foo");
        override.setAttribute("foo", "bar");
        override.setNullAttribute("foo");
        override.writeXml();
           
        assertFalse(override.getAttribute("foo") != null);
        assertFalse(override.getAttributes().containsKey("foo"));       
        assertFalse(override.isClearAttribute("foo"));
        assertFalse(override.getClearAttributes().contains("foo"));        
        assertTrue(override.isNullAttribute("foo"));
        assertTrue(override.getNullAttributes().contains("foo"));
       
        override = new GBeanOverride(gbeanType, new JexlExpressionParser());
        override.setAttribute("bar1", "foo");
        override.setAttribute("bar2", "foo");
        override.getAttributes().put("foo", null);
        GbeanType gbean = override.writeXml();
        assertEquals(3, gbean.getAttributeOrReference().size());
View Full Code Here

TOP

Related Classes of org.apache.geronimo.system.configuration.condition.JexlExpressionParser

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.