Package org.auraframework.def

Examples of org.auraframework.def.IncludeDefRef


        DefDescriptor<LibraryDef> libDesc = getAuraTestingUtil().createStringSourceDescriptor(null, LibraryDef.class,
                null);
        Builder builder = new LibraryDefImpl.Builder();
        builder.setDescriptor(libDesc);

        IncludeDefRef include = Mockito.mock(IncludeDefRef.class);
        Mockito.doReturn("included").when(include).getName();

        IncludeDefRef includeDupe = Mockito.mock(IncludeDefRef.class);
        Mockito.doReturn("included").when(includeDupe).getName();

        List<IncludeDefRef> includes = ImmutableList.of(include, includeDupe);
        builder.setIncludes(includes);
View Full Code Here


        Mockito.doReturn(DefType.LIBRARY).when(parentDescriptor).getDefType();
        Mockito.doReturn(expectedParentNamespace).when(parentDescriptor).getNamespace();
        Mockito.doReturn(parentDescriptor).when(parentHandler).getDefDescriptor();
        IncludeDefRefHandler handler = new IncludeDefRefHandler(parentHandler, getReader(source), source);

        IncludeDefRef actualDef = handler.getElement();
        assertEquals(expectedName, actualDef.getName());
        assertNull(actualDef.getDescription());
        assertNull(actualDef.getImports());
        assertNull(actualDef.getExport());

        DefDescriptor<IncludeDef> actualDesc = actualDef.getIncludeDescriptor();
        assertEquals(parentDescriptor.getNamespace(), actualDesc.getNamespace());
        assertEquals(expectedName, actualDesc.getName());
        assertEquals(parentDescriptor, actualDesc.getBundle());
    }
View Full Code Here

                Format.XML);
        Mockito.doReturn(DefType.LIBRARY).when(parentDescriptor).getDefType();
        Mockito.doReturn(parentDescriptor).when(parentHandler).getDefDescriptor();
        IncludeDefRefHandler handler = new IncludeDefRefHandler(parentHandler, getReader(source), source);

        IncludeDefRef actualDef = handler.getElement();
        assertEquals(expectedName, actualDef.getName());
    }
View Full Code Here

                Format.XML);
        Mockito.doReturn(DefType.LIBRARY).when(parentDescriptor).getDefType();
        Mockito.doReturn(parentDescriptor).when(parentHandler).getDefDescriptor();
        IncludeDefRefHandler handler = new IncludeDefRefHandler(parentHandler, getReader(source), source);

        IncludeDefRef actualDef = handler.getElement();
        assertEquals(expectedDescription, actualDef.getDescription());
    }
View Full Code Here

                Format.XML);
        Mockito.doReturn(DefType.LIBRARY).when(parentDescriptor).getDefType();
        Mockito.doReturn(parentDescriptor).when(parentHandler).getDefDescriptor();
        IncludeDefRefHandler handler = new IncludeDefRefHandler(parentHandler, getReader(source), source);

        IncludeDefRef actualDef = handler.getElement();
        List<DefDescriptor<IncludeDef>> actualImports = actualDef.getImports();
        assertEquals(1, actualImports.size());
        assertEquals(expectedImports, actualImports.get(0).getName());
        assertSame(parentDescriptor, actualImports.get(0).getBundle());
    }
View Full Code Here

                expectedBundleName, expectedImports), "myID", Format.XML);
        Mockito.doReturn(DefType.LIBRARY).when(parentDescriptor).getDefType();
        Mockito.doReturn(parentDescriptor).when(parentHandler).getDefDescriptor();
        IncludeDefRefHandler handler = new IncludeDefRefHandler(parentHandler, getReader(source), source);

        IncludeDefRef actualDef = handler.getElement();
        List<DefDescriptor<IncludeDef>> actualImports = actualDef.getImports();
        assertEquals(1, actualImports.size());
        assertEquals(expectedImports, actualImports.get(0).getName());
        assertEquals(expectedBundleNamespace, actualImports.get(0).getBundle().getNamespace());
        assertEquals(expectedBundleName, actualImports.get(0).getBundle().getName());
    }
View Full Code Here

                " \t\r\n" + StringUtils.join(expectedImports, " \t\r\n, \t\r\n")) + " \t\r\n", "myID", Format.XML);
        Mockito.doReturn(DefType.LIBRARY).when(parentDescriptor).getDefType();
        Mockito.doReturn(parentDescriptor).when(parentHandler).getDefDescriptor();
        IncludeDefRefHandler handler = new IncludeDefRefHandler(parentHandler, getReader(source), source);

        IncludeDefRef actualDef = handler.getElement();
        List<DefDescriptor<IncludeDef>> actualImports = actualDef.getImports();
        assertEquals(expectedImports.size(), actualImports.size());
        for (DefDescriptor<IncludeDef> actual : actualImports) {
            assertSame(parentDescriptor, actual.getBundle());
            if (!expectedImports.remove(actual.getName())) {
                fail("unexpected import found: " + actual.getQualifiedName());
View Full Code Here

                Format.XML);
        Mockito.doReturn(DefType.LIBRARY).when(parentDescriptor).getDefType();
        Mockito.doReturn(parentDescriptor).when(parentHandler).getDefDescriptor();
        IncludeDefRefHandler handler = new IncludeDefRefHandler(parentHandler, getReader(source), source);

        IncludeDefRef actualDef = handler.getElement();
        String actualExports = actualDef.getExport();
        assertEquals(expectedExports, actualExports);
    }
View Full Code Here

TOP

Related Classes of org.auraframework.def.IncludeDefRef

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.