Package org.teiid.query.mapping.xml

Examples of org.teiid.query.mapping.xml.MappingElement


        element.setDefaultValue("foo"); //$NON-NLS-1$
        assertEquals("foo", element.getDefaultValue()); //$NON-NLS-1$
    }
   
    public void testFixedValue() {
        MappingElement element = new MappingElement("Test"); //$NON-NLS-1$
        assertNull(element.getValue());

        element.setValue("foo"); //$NON-NLS-1$
        assertEquals("foo", element.getValue()); //$NON-NLS-1$
    }   
View Full Code Here


        element.setValue("foo"); //$NON-NLS-1$
        assertEquals("foo", element.getValue()); //$NON-NLS-1$
    }   
   
    public void testOptional() {
        MappingElement element = new MappingElement("Test"); //$NON-NLS-1$
        assertFalse(element.isOptional());

        element.setOptional(true);
        assertTrue(element.isOptional());
    }
View Full Code Here

        element.setOptional(true);
        assertTrue(element.isOptional());
    }
   
    public void testNormalizeText() {
        MappingElement element = new MappingElement("Test"); //$NON-NLS-1$
        assertEquals(MappingNodeConstants.Defaults.DEFAULT_NORMALIZE_TEXT, element.getNormalizeText());

        element.setNormalizeText("foo"); //$NON-NLS-1$
        assertEquals("foo", element.getNormalizeText()); //$NON-NLS-1$
    }   
View Full Code Here

        element.setNormalizeText("foo"); //$NON-NLS-1$
        assertEquals("foo", element.getNormalizeText()); //$NON-NLS-1$
    }   

    public void testType() {
        MappingElement element = new MappingElement("Test"); //$NON-NLS-1$
        assertNull(element.getType());

        element.setType("int"); //$NON-NLS-1$
        assertEquals("int", element.getType());//$NON-NLS-1$       
    }
View Full Code Here

        element.setType("int"); //$NON-NLS-1$
        assertEquals("int", element.getType());//$NON-NLS-1$       
    }
   
    public void testInclude() {
        MappingElement element = new MappingElement("Test"); //$NON-NLS-1$
        assertTrue(element.isAlwaysInclude());

        element.setAlwaysInclude(false);
        assertFalse(element.isAlwaysInclude());
    }   
View Full Code Here

        element.setAlwaysInclude(false);
        assertFalse(element.isAlwaysInclude());
    }   
   
    public void testMinOccurence() {
        MappingElement element = new MappingElement("Test"); //$NON-NLS-1$
        assertEquals(1, element.getMinOccurence());

        element.setMinOccurrs(2);
        assertEquals(2, element.getMinOccurence());
    }   
View Full Code Here

        element.setMinOccurrs(2);
        assertEquals(2, element.getMinOccurence());
    }   
   
    public void testMaxOccurence() {
        MappingElement element = new MappingElement("Test"); //$NON-NLS-1$
        assertEquals(1, element.getMaxOccurence());

        element.setMaxOccurrs(2);
        assertEquals(2, element.getMaxOccurence());
    }    
View Full Code Here

        element.setMaxOccurrs(2);
        assertEquals(2, element.getMaxOccurence());
    }    
   
    public void testExclude() {
        MappingElement element = new MappingElement("Test"); //$NON-NLS-1$
        assertFalse(element.isExcluded());

        element.setExclude(true);
        assertTrue(element.isExcluded());
    }
View Full Code Here

        element.setExclude(true);
        assertTrue(element.isExcluded());
    }
   
    public void testSource() {       
        MappingElement element = new MappingElement("Test"); //$NON-NLS-1$
        assertNull(element.getSource());
    }    
View Full Code Here

        MappingElement element = new MappingElement("Test"); //$NON-NLS-1$
        assertNull(element.getSource());
    }    

    public void testChildren() {
        MappingElement element = new MappingElement("Test"); //$NON-NLS-1$
       
        element.addCommentNode(new MappingCommentNode("this is comment text")); //$NON-NLS-1$
        element.addAttribute(new MappingAttribute("foo", "fooReal")); //$NON-NLS-1$ //$NON-NLS-2$
        element.addChildElement(new MappingElement("child1")); //$NON-NLS-1$
        element.addChoiceNode(new MappingChoiceNode());
        element.addSequenceNode(new MappingSequenceNode());
        element.addAllNode(new MappingAllNode());
       
        assertEquals(5, element.getNodeChildren().size());
        assertEquals(1, element.getAttributes().size());
       
        List list = element.getNodeChildren();
        assertTrue(list.get(0) instanceof MappingCommentNode);
        assertTrue(list.get(1) instanceof MappingElement);
        assertTrue(list.get(2) instanceof MappingChoiceNode);
        assertTrue(list.get(3) instanceof MappingSequenceNode);
        assertTrue(list.get(4) instanceof MappingAllNode);
View Full Code Here

TOP

Related Classes of org.teiid.query.mapping.xml.MappingElement

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.