Package org.auraframework.def

Examples of org.auraframework.def.ClientLibraryDef


        ClientLibraryResolverRegistryImpl.INSTANCE.register(unCombinableResolver);
        assertFalse(clientLibraryService.canCombine(combinableURL));
    }

    public void testLibraryDefWithUrlCanBeCombinedWithoutUsingResolver() throws Exception {
        ClientLibraryDef combinableURL = vendor.makeClientLibraryDef("fooBar",
                "js://clientLibraryTest.clientLibraryTest", Type.JS,
                null, true, null, null);
        assertTrue("ResourceDef should always to combined", clientLibraryService.canCombine(combinableURL));
        ClientLibraryDef unCombinableURL = vendor.makeClientLibraryDef("fooBar",
                "js://clientLibraryTest.clientLibraryTest", Type.JS,
                null, false, null, null);
        assertTrue("ResourceDef should always to combined", clientLibraryService.canCombine(unCombinableURL));
        // TODO: If a library cannot be resolved, can it still be combined?

        ClientLibraryDef blankURL = vendor.makeClientLibraryDef("fooBar", "", Type.JS,
                null, true, null, null);
        try {
            clientLibraryService.canCombine(blankURL);
            fail("Client library will blank url and no resolver should throw exception");
        } catch (QuickFixException qfe) {
View Full Code Here


                        "</aura:component>", "myID",
                Format.XML);
        ComponentDef cmpDef = parser.parse(descriptor, source);
        List<ClientLibraryDef> libraries = cmpDef.getClientLibraries();
        assertEquals(2, libraries.size());
        ClientLibraryDef cld1 = libraries.get(0);
        assertTrue(cld1.getModes().isEmpty());

        ClientLibraryDef cld2 = libraries.get(1);
        assertEquals(0, cld2.getModes().size());
    }
View Full Code Here

                Format.XML);
        ComponentDef cmpDef = parser.parse(descriptor, source);
        List<ClientLibraryDef> libraries = cmpDef.getClientLibraries();
        assertEquals(2, libraries.size());

        ClientLibraryDef cld1 = libraries.get(0);
        assertEquals(1, cld1.getModes().size());
        assertTrue(cld1.getModes().contains(Mode.DEV));
        assertEquals(Sets.newHashSet(Mode.DEV), cld1.getModes());

        ClientLibraryDef cld2 = libraries.get(1);
        assertEquals(2, cld2.getModes().size());
        assertEquals(Sets.newHashSet(Mode.DEV, Mode.FTEST), cld2.getModes());
    }
View Full Code Here

                Format.XML);
        ComponentDef cmpDef = parser.parse(descriptor, source);
        List<ClientLibraryDef> libraries = cmpDef.getClientLibraries();
        assertEquals(1, libraries.size());

        ClientLibraryDef cld1 = libraries.get(0);
        assertFalse(cld1.shouldCombine());
    }
View Full Code Here

                        "</aura:component>", "myID",
                Format.XML);
        ComponentDef cmpDef = parser.parse(descriptor, source);
        List<ClientLibraryDef> libraries = cmpDef.getClientLibraries();
        assertEquals(9, libraries.size());
        ClientLibraryDef cld;
        for(int i= 0; i< 3; i++){
             cld = libraries.get(i);
            assertTrue(i + " should be combine", cld.shouldCombine());
        }
        for(int i= 3; i< 9; i++){
            cld = libraries.get(i);
           assertFalse(i + " should not combine", cld.shouldCombine());
       }
    }
View Full Code Here

                        "</aura:component>", "myID",
                Format.XML);
        ComponentDef cmpDef = parser.parse(descriptor, source);
        List<ClientLibraryDef> libraries = cmpDef.getClientLibraries();
        assertEquals(6, libraries.size());
        ClientLibraryDef cld;
        for(int i= 0; i< 6; i++){
             cld = libraries.get(i);
            assertFalse(cld.shouldCombine());
        }
    }
View Full Code Here

                        "</aura:component>", "myID",
                Format.XML);
        ComponentDef cmpDef = parser.parse(descriptor, source);
        List<ClientLibraryDef> libraries = cmpDef.getClientLibraries();
        assertEquals(2, libraries.size());
        ClientLibraryDef cld;
        for(int i= 0; i< 2; i++){
             cld = libraries.get(i);
            assertTrue(cld.shouldCombine());
        }
    }
View Full Code Here

                Format.XML);
        ComponentDef cmpDef = parser.parse(descriptor, source);
        List<ClientLibraryDef> libraries = cmpDef.getClientLibraries();
        assertEquals(1, libraries.size());

        ClientLibraryDef cld = libraries.get(0);
        assertEquals("", cld.getUrl());
    }
View Full Code Here

TOP

Related Classes of org.auraframework.def.ClientLibraryDef

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.