Package org.apache.tapestry5.ioc.services

Examples of org.apache.tapestry5.ioc.services.SymbolProvider


    }

    @Test
    public void missing_brace()
    {
        SymbolProvider provider = mockSymbolProvider();

        List<SymbolProvider> providers = Arrays.asList(provider);

        replay();
View Full Code Here


    }

    @Test
    public void indirect_expansions()
    {
        SymbolProvider provider = mockSymbolProvider();

        List<SymbolProvider> providers = Arrays.asList(provider);

        train_valueForSymbol(provider, "fred.friends", "${barney} and ${dino}");
        train_valueForSymbol(provider, "barney", "Barney");
View Full Code Here

    @Test
    public void undefined_symbol_in_path()
    {

        SymbolProvider provider = mockSymbolProvider();

        List<SymbolProvider> providers = Arrays.asList(provider);

        train_valueForSymbol(provider, "barney", "Barney (whose friends are ${barney.friends})");
        train_valueForSymbol(provider, "barney.friends", "${fred} and ${betty}");
View Full Code Here

    @Test
    public void missing_brace_in_path()
    {

        SymbolProvider provider = mockSymbolProvider();

        List<SymbolProvider> providers = Arrays.asList(provider);

        train_valueForSymbol(provider, "barney", "Barney (whose friends are ${barney.friends})");
        train_valueForSymbol(provider, "barney.friends", "${fred} and ${betty");
View Full Code Here

    }

    @Test
    public void providers_searched_in_order()
    {
        SymbolProvider provider1 = mockSymbolProvider();
        SymbolProvider provider2 = mockSymbolProvider();

        List<SymbolProvider> providers = Arrays.asList(provider1, provider2);

        train_valueForSymbol(provider1, "fred.friends", "${barney} and ${dino}");
        train_valueForSymbol(provider1, "barney", null);
View Full Code Here

    }

    @Test
    public void symbols_are_cached()
    {
        SymbolProvider provider = mockSymbolProvider();

        List<SymbolProvider> providers = Arrays.asList(provider);

        train_valueForSymbol(provider, "fred", "Fred's friends are ${barney} and ${dino}.");
        train_valueForSymbol(provider, "barney", "Barney");
View Full Code Here

    }

    @Test
    public void recursive_symbols_fail()
    {
        SymbolProvider provider = mockSymbolProvider();

        List<SymbolProvider> providers = Arrays.asList(provider);

        train_valueForSymbol(provider, "fred", "Fred (whose friends are ${fred.friends})");
        train_valueForSymbol(provider, "fred.friends", "${barney} and ${dino}");
View Full Code Here

     */
    public PageTester(String appPackage, String appName, String contextPath, Class... moduleClasses)
    {
        preferedLanguage = Locale.ENGLISH;

        SymbolProvider provider = new SingleKeySymbolProvider(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM, appPackage);

        TapestryAppInitializer initializer = new TapestryAppInitializer(provider, appName, PageTesterModule.TEST_MODE);

        initializer.addModules(PageTesterModule.class);
        initializer.addModules(moduleClasses);
View Full Code Here

    @Test
    public void unknown_validator_type()
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        Map<String, Validator> map = newMap();
View Full Code Here

    @Test
    public void validator_with_no_constraint() throws Exception
    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ioc.services.SymbolProvider

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.