Package org.apache.commons.betwixt

Examples of org.apache.commons.betwixt.BindingConfiguration


     * It can therefore be safely be modified.
     * </p>
     * @return BindingConfiguration, not null
     */
    public BindingConfiguration createSchemaBindingConfiguration() {
        BindingConfiguration configuration = new BindingConfiguration();
        configuration.setMapIDs(false);
        return configuration;  
    }
View Full Code Here


        return new TestSuite(TestReadContext.class);
    }   
   
    public void testElementStackPushPop() throws Exception {
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());
        context.pushElement("alpha");
        assertEquals("Push then pop", "alpha", context.popElement());
        assertEquals("Push then pop at bottom", null, context.popElement());
       
View Full Code Here

          
    }
      
    public void testElementStackMarkedPushPop() throws Exception {
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());

        context.pushElement("beta");
        context.pushElement("delta");
        context.markClassMap(Object.class);
View Full Code Here

    }
   
    public void testLastMappedClassNoClass() throws Exception
    {
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());
        context.pushElement("beta");
        context.pushElement("delta");
        context.pushElement("gamma");
        assertEquals("No class", null, context.getLastMappedClass());
View Full Code Here

        context.pushElement("gamma");
        assertEquals("No class", null, context.getLastMappedClass());
    }
   
    public void testGetCurrentElement() throws Exception {
        ReadContext context = new ReadContext(new BindingConfiguration(), new ReadConfiguration());
        context.pushElement("element");
        context.markClassMap(String.class);
        assertEquals("Current element: ", "element", context.getCurrentElement());
    }
View Full Code Here

    }
   
    public void testLastMappedClassBottomClass() throws Exception
    {
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());

        context.markClassMap(Object.class);
        context.pushElement("beta");
        context.pushElement("delta");
View Full Code Here

   
    public void testLastMappedClassTwoClasses() throws Exception
    {
       
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());   
        context.markClassMap(Object.class);
        context.pushElement("beta");
        context.pushElement("delta");
        context.markClassMap(String.class);
View Full Code Here

        super(testName);
    }

    public void testArrayMapping() throws Exception {
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());
       
        context.pushElement("LibraryBeanWithArraySetter");  
        context.markClassMap(LibraryBeanWithArraySetter.class);
        context.pushElement("books");
View Full Code Here

        ElementMapping elementMapping = new ElementMapping();
        elementMapping.setAttributes(new AttributesImpl());
        elementMapping.setName("Bogus");
        elementMapping.setDescriptor(descriptor);
        elementMapping.setType(Iterator.class);
        ReadContext readContext = new ReadContext(new BindingConfiguration(), new ReadConfiguration());
       
        assertNull(introspector.getPolymorphicReferenceResolver().resolveType(elementMapping, readContext));
       
        elementMapping.setName("elementA");
        Class resolution = introspector.getPolymorphicReferenceResolver().resolveType(elementMapping, readContext);
View Full Code Here

        super(testName);
    }

    public void testArrayMapping() throws Exception {
        ReadContext context = new ReadContext(
                    new BindingConfiguration(),
                    new ReadConfiguration());
       
        context.pushElement("LibraryBeanWithArraySetter");  
        context.markClassMap(LibraryBeanWithArraySetter.class);
        context.pushElement("books");
View Full Code Here

TOP

Related Classes of org.apache.commons.betwixt.BindingConfiguration

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.