Examples of XMLMetaBeanURLLoader


Examples of org.apache.bval.xml.XMLMetaBeanURLLoader

    }

    public void setUp() throws Exception {
        super.setUp();
        mbm = new XMLMetaBeanManager();
        mbm.addLoader(new XMLMetaBeanURLLoader(BusinessObject.class.getResource("test-beanInfos.xml")));
    }
View Full Code Here

Examples of org.apache.bval.xml.XMLMetaBeanURLLoader

        MetaBean mbean = mbm.findForClass(BusinessObject.class);
        MetaProperty mprop = mbean.getProperty("lastName");
        assertTrue(mprop.isMandatory());

        mbm.getCache().removeFromCache(mbean);
        mbm.addLoader(new XMLMetaBeanURLLoader(BusinessObject.class.getResource("test-beanInfos-custom.xml")));
        mbean = mbm.findForClass(BusinessObject.class);
        mprop = mbean.getProperty("lastName");
        assertTrue(!mprop.isMandatory());

        JSONGenerator converter = new JSONGenerator();
View Full Code Here

Examples of org.apache.bval.xml.XMLMetaBeanURLLoader

    public void tearDown() throws Exception {
        super.tearDown();
    }

    public void testValidateMapAsBean() {
        MetaBeanManagerFactory.getRegistry().addLoader(new XMLMetaBeanURLLoader(
              BusinessObject.class.getResource("test-beanInfos.xml")));

        MetaBean mb = MetaBeanManagerFactory.getFinder()
              .findForId("org.apache.bval.example.Address");
View Full Code Here

Examples of org.apache.bval.xml.XMLMetaBeanURLLoader

        assertTrue(results.isEmpty());
    }

    public void testValidate() {
        MetaBeanFinder finder = MetaBeanManagerFactory.getFinder();
        MetaBeanManagerFactory.getRegistry().addLoader(new XMLMetaBeanURLLoader(
              BusinessObject.class.getResource("test-beanInfos.xml")));
        MetaBean info = finder.findForClass(BusinessObject.class);
        BusinessObject object = new BusinessObject();
        object.setAddress(new BusinessObjectAddress());
        object.getAddress().setOwner(object);
View Full Code Here

Examples of org.apache.bval.xml.XMLMetaBeanURLLoader

        super(name);
    }

    public void setUp() throws Exception {
        super.setUp();
        mbm.getBuilder().addLoader(new XMLMetaBeanURLLoader(
              BusinessObject.class.getResource("test-beanInfos.xml")));
    }
View Full Code Here

Examples of org.apache.bval.xml.XMLMetaBeanURLLoader

    public void tearDown() throws Exception {
        super.tearDown();
    }

    public void testEnrichCopies() throws Exception {
        Map<String, MetaBean> copies = mbm.enrichCopies(new XMLMetaBeanURLLoader(
              BusinessObject.class.getResource("test-beanInfos-custom.xml")).load());
        assertNotNull(copies);
        MetaBean mb = copies.get(BusinessObject.class.getName());
        assertFalse(mb.getProperty("lastName").isMandatory());
        MetaBean mb2 = mbm.findForClass(BusinessObject.class);
View Full Code Here

Examples of org.apache.bval.xml.XMLMetaBeanURLLoader

    public MetaBeanManager(MetaBeanBuilder builder) {
        this.builder = builder;
    }

    public void addResourceLoader(String resource) {
        addLoader(new XMLMetaBeanURLLoader(
              PrivilegedActions.getClassLoader(getClass()).getResource(resource)));
    }
View Full Code Here

Examples of org.apache.bval.xml.XMLMetaBeanURLLoader

  }

  public void setUp() throws Exception {
    super.setUp();
    mbm = new MetaBeanManager();
    mbm.getBuilder().addLoader(new XMLMetaBeanURLLoader(
        BusinessObject.class.getResource("test-beanInfos.xml")));
  }
View Full Code Here

Examples of org.apache.bval.xml.XMLMetaBeanURLLoader

    MetaBean mbean = mbm.findForClass(BusinessObject.class);
    MetaProperty mprop = mbean.getProperty("lastName");
    assertTrue(mprop.isMandatory());

    mbm.getCache().removeFromCache(mbean);
    mbm.getBuilder().addLoader(new XMLMetaBeanURLLoader(
        BusinessObject.class.getResource("test-beanInfos-custom.xml")));
    mbean = mbm.findForClass(BusinessObject.class);
    mprop = mbean.getProperty("lastName");
    assertTrue(!mprop.isMandatory());
View Full Code Here

Examples of org.apache.bval.xml.XMLMetaBeanURLLoader

    }

    public void setUp() throws Exception {
        super.setUp();
        mbm = new XMLMetaBeanManager();
        mbm.addLoader(new XMLMetaBeanURLLoader(BusinessObject.class.getResource("test-beanInfos.xml")));
    }
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.