Package com.alibaba.citrus.springext.support.context

Examples of com.alibaba.citrus.springext.support.context.XmlApplicationContext


    private        WebxConfiguration    conf;
    private        ComponentsConfigImpl config;

    @BeforeClass
    public static void initFactory() throws Exception {
        factory = new XmlApplicationContext(new FileSystemResource(new File(srcdir, "webx-configuration.xml")));
    }
View Full Code Here


    public void init() {
        if (skipValidation) {
            System.setProperty("skipValidation", "true");
        }

        factory = new XmlApplicationContext(new FileSystemResource(new File(srcdir, "services-skip-validation.xml")));
        moduleLoaderService = (ModuleLoaderServiceImpl) factory.getBean("moduleLoaderService");
    }
View Full Code Here

public class NamedBeanDefinitionParserTests {
    private static XmlApplicationContext factory;

    @BeforeClass
    public static void initFactory() {
        factory = new XmlApplicationContext(new FileSystemResource(new File(srcdir, "my-beans.xml")));
    }
View Full Code Here

    /** 未指定id,且<code>getDefaultName()</code>返回空。 */
    @Test
    public void noDefaultName_And_NoIdSpecified() {
        try {
            new XmlApplicationContext(new FileSystemResource(new File(srcdir, "my-beans-no-default-name.xml")));
            fail();
        } catch (FatalBeanException e) {
            assertThat(e, exception(IllegalArgumentException.class, "neither id nor defaultName was specified"));
        }
    }
View Full Code Here

        factory = new XmlBeanFactory(new FileSystemResource(new File(srcdir, "beans.xml")));
    }

    @Test
    public void autowireAndInitialize() throws Exception {
        ApplicationContext context = new XmlApplicationContext(new FileSystemResource(new File(srcdir, "beans.xml")));

        class Bean implements BeanNameAware, ApplicationContextAware, InitializingBean {
            @Autowired
            private com.alibaba.citrus.springext.support.context.MyClass myClass;
            private String                                               beanName;
View Full Code Here

        Servlet3Util.setDisableServlet3Features(true); // 禁用servlet3,因为httpunit还不支持
    }

    /** 创建beanFactory。 */
    protected static void createBeanFactory(String configLocation) {
        factory = new XmlApplicationContext(new FileSystemResource(new File(srcdir, configLocation)));
    }
View Full Code Here

    static {
        TestEnvStatic.init();
    }

    protected static ApplicationContext createFactory(String location) {
        return new XmlApplicationContext(new FileSystemResource(new File(srcdir, location)));
    }
View Full Code Here

    public void init() {
        if (skipValidation) {
            System.setProperty("skipValidation", "true");
        }

        factory = new XmlApplicationContext(new FileSystemResource(new File(srcdir, "services-skip-validation.xml")));
        TemplateService templateService = (TemplateService) factory.getBean("templateService");
        freeMarkerEngine = (FreeMarkerEngineImpl) templateService.getTemplateEngine("ftl");
    }
View Full Code Here

        assertResourceServiceList("/test.txt", "test.txt", true, false);
    }

    @Test
    public void noParent() throws Exception {
        ApplicationContext factory = new XmlApplicationContext(new FileSystemResource(new File(srcdir,
                                                                                               "loader/super-loader.xml")));

        resourceLoadingService = (ResourceLoadingService) factory.getBean("resourceLoadingService");
        assertResourceServiceList("/no_name/webroot/test.txt", "test.txt", false, false);
        assertResourceServiceList("/with_name/test.txt", "test.txt", false, false);

        resourceLoadingService = (ResourceLoadingService) factory.getBean("sameName");
        assertResourceServiceList("/webroot/test.txt", "test.txt", false, false);

        resourceLoadingService = (ResourceLoadingService) factory.getBean("defaultName");
        assertResourceServiceList("/test.txt", "test.txt", false, false);

        resourceLoadingService = (ResourceLoadingService) factory.getBean("defaultName1");
        assertResourceServiceList("/test.txt", "test.txt", false, false);
    }
View Full Code Here

    public final void initLog() {
        ExecutionLog.reset();
    }

    protected static void createFactory(String location) {
        factory = new XmlApplicationContext(new FileSystemResource(new File(srcdir, location)));
    }
View Full Code Here

TOP

Related Classes of com.alibaba.citrus.springext.support.context.XmlApplicationContext

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.