Package org.auraframework.impl.root

Examples of org.auraframework.impl.root.RootDefFactory


            }

            if (markupLoaders.size() > 0) {
                SourceFactory markupSourceFactory = new SourceFactory(markupLoaders);

                regBuild.add(createDefRegistry(new RootDefFactory(markupSourceFactory), rootDefTypes, rootPrefixes));
                regBuild.add(AuraRegistryProviderImpl.<ControllerDef> createJavascriptRegistry(markupSourceFactory,
                        DefType.CONTROLLER));
                regBuild.add(AuraRegistryProviderImpl.<TestSuiteDef> createJavascriptRegistry(markupSourceFactory,
                        DefType.TESTSUITE));
                regBuild.add(AuraRegistryProviderImpl.<RendererDef> createJavascriptRegistry(markupSourceFactory,
View Full Code Here


        addSourceAutoCleanup(ApplicationDef.class, baseContents, String.format("%s:houseparty", namespace));
        addSourceAutoCleanup(ApplicationDef.class, baseContents, String.format("%s:pantsparty", namespace));

        StringSourceLoader loader = StringSourceLoader.getInstance();
        List<SourceLoader> loaders = Lists.newArrayList((SourceLoader) loader);
        RootDefFactory factory = new RootDefFactory(new SourceFactory(loaders));

        assertTrue("RootDefFactory should have a find() method", factory.hasFind());
        assertTrue("find() not finding all sources",
                factory.find(new DescriptorFilter(String.format("markup://%s:*", namespace))).size() == 3);
        assertEquals("find() fails with wildcard as prefix", 1,
                factory.find(new DescriptorFilter("*://" + houseboat.getDescriptorName())).size());
        assertEquals("find() fails with wildcard as namespace", 1,
                factory.find(new DescriptorFilter("markup://*:" + houseboat.getName())).size());
        assertEquals("find() fails with wildcard as name", 1,
                factory.find(new DescriptorFilter(houseboat.getQualifiedName())).size());
        assertEquals("find() fails with wildcard at end of name", 2,
                factory.find(new DescriptorFilter(String.format("markup://%s:house*", namespace))).size());
        assertEquals("find() fails with wildcard at beginning of name", 2,
                factory.find(new DescriptorFilter(String.format("markup://%s:*party*", namespace))).size());

        assertEquals("find() should not find nonexistent name", 0,
                factory.find(new DescriptorFilter(String.format("markup://%s:househunters", namespace))).size());
        assertEquals("find() should not find nonexistent name ending with wildcard", 0,
                factory.find(new DescriptorFilter(String.format("markup://%s:househunters*", namespace))).size());
        assertEquals("find() should not find nonexistent name with preceeding wildcard", 0,
                factory.find(new DescriptorFilter(String.format("markup://%s:*notherecaptain", namespace))).size());
    }
View Full Code Here

TOP

Related Classes of org.auraframework.impl.root.RootDefFactory

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.