Package com.alibaba.citrus.util.internal.webpagelite.simple

Examples of com.alibaba.citrus.util.internal.webpagelite.simple.SimpleComponent


    @Test
    public void getComponentPaths() {
        MyProcessor processor = new MyProcessor();
        assertArrayEquals(new String[] { "simple/" }, processor.getComponentPaths());

        new SimpleComponent(processor, "a");
        new SimpleComponent(processor, "x/c");
        new SimpleComponent(processor, "x/b");
        new SimpleComponent(processor, "x/b/c");
        new SimpleComponent(processor, "x/b/d");

        // 注意排序
        assertArrayEquals(new String[] { "simple/", "x/b/c/", "x/b/d/", "x/b/", "x/c/", "a/" },
                          processor.getComponentPaths());
    }
View Full Code Here


    @Test
    public void dupComponent() {
        MyProcessor processor = new MyProcessor();

        try {
            new SimpleComponent(processor, "simple");
            fail();
        } catch (IllegalArgumentException e) {
            assertThat(e, TestUtil.exception("duplicated component", "simple"));
        }
    }
View Full Code Here

    }

    @Test
    public void getComponent() {
        MyProcessor processor = new MyProcessor();
        SimpleComponent sc = processor.getComponent("simple", SimpleComponent.class);
        assertSame(processor.simple, sc);

        // without type
        sc = processor.getComponent("simple", null);
        assertSame(processor.simple, sc);
View Full Code Here

TOP

Related Classes of com.alibaba.citrus.util.internal.webpagelite.simple.SimpleComponent

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.