Examples of SymbolSource


Examples of org.apache.hivemind.SymbolSource

            {
                List contribution = new ArrayList();
               
                // Add the default symbol sources FactoryDefaults and
                // ApplicationDefaults
                SymbolSource factoryDefaults = (SymbolSource) context.getService(
                        "FactoryDefaultsSymbolSource", SymbolSource.class);
                SymbolSourceContribution factoryDefaultsContrib = new SymbolSourceContribution(factoryDefaults,
                        "hivemind.FactoryDefaults", null, null);
                contribution.add(factoryDefaultsContrib);

                SymbolSource applicationDefaults = (SymbolSource) context.getService(
                        "ApplicationDefaultsSymbolSource", SymbolSource.class);
                SymbolSourceContribution applicationDefaultsContrib = new SymbolSourceContribution(applicationDefaults,
                        "hivemind.ApplicationDefaults", null, "hivemind.FactoryDefaults");
                contribution.add(applicationDefaultsContrib);
               
View Full Code Here

Examples of org.apache.hivemind.SymbolSource

    {
        ErrorHandler eh = (ErrorHandler) newMock(ErrorHandler.class);
        Location l = newLocation();

        MockControl control = newControl(SymbolSource.class);
        SymbolSource source = (SymbolSource) control.getMock();

        // Training

        source.valueForSymbol("symbol");
        control.setReturnValue(null);

        eh.error(
            LogFactory.getLog(SymbolExpanderImpl.class),
            XmlImplMessages.noSuchSymbol("symbol"),
View Full Code Here

Examples of org.apache.hivemind.SymbolSource

      attempt("${not-a-symbol}", "$${not-a-symbol}");
    }

    public void testSystemPropertiesSymbolSource()
    {
        SymbolSource s = new SystemPropertiesSymbolSource();

        assertEquals(System.getProperty("user.home"), s.valueForSymbol("user.home"));
    }
View Full Code Here

Examples of org.apache.hivemind.SymbolSource

    {
        ErrorHandler eh = (ErrorHandler) newMock(ErrorHandler.class);
        Location l = newLocation();

        MockControl control = newControl(SymbolSource.class);
        SymbolSource source = (SymbolSource) control.getMock();

        // Training

        source.valueForSymbol("symbol");
        control.setReturnValue(null);

        eh.error(
            LogFactory.getLog(SymbolExpander.class),
            ImplMessages.noSuchSymbol("symbol"),
View Full Code Here

Examples of org.apache.hivemind.SymbolSource

        verifyControls();
    }

    public void testSystemPropertiesSymbolSource()
    {
        SymbolSource s = new SystemPropertiesSymbolSource();

        assertEquals(System.getProperty("user.home"), s.valueForSymbol("user.home"));
    }
View Full Code Here

Examples of org.apache.hivemind.SymbolSource

        verifyControls();
    }

    public void testSystemPropertiesSymbolSource()
    {
        SymbolSource s = new SystemPropertiesSymbolSource();

        assertEquals(System.getProperty("user.home"), s.valueForSymbol("user.home"));
    }
View Full Code Here

Examples of org.apache.tapestry.ioc.services.SymbolSource

    {
        AssetSource source = mockAssetSource();
        ObjectLocator locator = mockObjectLocator();
        AnnotationProvider annotationProvider = mockAnnotationProvider();
        TypeCoercer typeCoercer = mockTypeCoercer();
        SymbolSource symbolSource = mockSymbolSource();

        train_getAnnotation(annotationProvider, Path.class, null);

        replay();
View Full Code Here

Examples of org.apache.tapestry.ioc.services.SymbolSource

        String path = "${foo}";
        String expanded = "foo/bar/baz.gif";
        AnnotationProvider annotationProvider = mockAnnotationProvider();
        TypeCoercer typeCoercer = mockTypeCoercer();
        Path pathAnnotation = mockPath();
        SymbolSource symbolSource = mockSymbolSource();

        train_getAnnotation(annotationProvider, Path.class, pathAnnotation);
        train_value(pathAnnotation, path);
        train_expandSymbols(symbolSource, path, expanded);
        train_findAsset(source, null, expanded, null, asset);
View Full Code Here

Examples of org.apache.tapestry.ioc.services.SymbolSource

        String path = "${root}/foo/bar.pdf";
        String expanded = "org/apache/tapestry/foo/bar.pdf";

        DocumentScriptBuilder builder = mockDocumentScriptBuilder();
        Asset asset = mockAsset();
        SymbolSource source = mockSymbolSource();
        AssetSource assetSource = mockAssetSource();

        train_expandSymbols(source, path, expanded);

        train_findAsset(assetSource, null, expanded, null, asset);
View Full Code Here

Examples of org.apache.tapestry.ioc.services.SymbolSource

public class ValueObjectProviderTest extends IOCTestCase
{
    @Test
    public void no_value_annotation()
    {
        SymbolSource symbolSource = mockSymbolSource();
        TypeCoercer coercer = mockTypeCoercer();
        AnnotationProvider annotationProvider = mockAnnotationProvider();
        ObjectLocator locator = mockObjectLocator();

        train_getAnnotation(annotationProvider, Value.class, null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.