Spring Framework XmlReaderContext - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework XmlReaderContext class.

This code example shows how to use the following methods:
	@Before 
	public void setUp() throws Exception {
		SourceExtractor sourceExtractor = new PassThroughSourceExtractor();
		XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(this.registry);
		XmlReaderContext readerContext =
				new XmlReaderContext(null, null, this.readerEventListener, sourceExtractor, reader, null);
		this.parserContext = new ParserContext(readerContext, null);
	} 
 
	@Test
	public void testRegisterAutoProxyCreator() throws Exception {
		AopNamespaceUtils.registerAutoProxyCreatorIfNecessary(this.parserContext, null);
		assertEquals("Incorrect number of definitions registered", 1, registry.getBeanDefinitionCount());
 
		AopNamespaceUtils.registerAspectJAutoProxyCreatorIfNecessary(this.parserContext, null);
		assertEquals("Incorrect number of definitions registered", 1, registry.getBeanDefinitionCount());
	} 
 
	@Test
	public void testRegisterAspectJAutoProxyCreator() throws Exception {
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
/** 
 * @author Dan Oxlade 
 */ 
class ParserTestUtil { 
    static ParserContext createFakeParserContext() {
        return new ParserContext(new XmlReaderContext(thisClassAsResource(), new FailFastProblemReporter(), null, null, null, null), null);
    } 
 
    static InputStreamResource thisClassAsResource() {
        return new InputStreamResource(ParserTestUtil.class.getResourceAsStream(ParserTestUtil.class.getSimpleName() + ".class"));
    } 
 
 
    static org.w3c.dom.Document loadXMLFrom(String xml)
            throws org.xml.sax.SAXException, java.io.IOException {
        return loadXMLFrom(new java.io.ByteArrayInputStream(xml.getBytes()));
    } 
 
    static org.w3c.dom.Document loadXMLFrom(java.io.InputStream is)
            throws org.xml.sax.SAXException, java.io.IOException {
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
This code example shows how to use the following methods:
 
    Method[] methodsToMock = { parseBeanDefinitionElementMethod };
 
    helperControl = MockClassControl.createControl(targetClass,
				new Class[] { XmlReaderContext.class },
				new Object[] { new XmlReaderContext(null, null, null, null, null, null) },
				methodsToMock);
 
    delegate = (BeanDefinitionParserDelegate) helperControl.getMock();
  } 
 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getRegistry
        return c;
    } 
 
    @Override 
    protected ClassPathBeanDefinitionScanner createScanner(XmlReaderContext readerContext, boolean useDefaultFilters) {
        return new DevproofClassPathBeanDefinitionScanner(readerContext.getRegistry(), useDefaultFilters, moduleConfiguration);
    } 
} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java