Package org.apache.tapestry5.ioc

Examples of org.apache.tapestry5.ioc.ObjectLocator


    @Test
    public void explicit_block_id_provided_as_annotation()
    {
        ClassTransformation ct = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        ObjectLocator locator = mockObjectLocator();
        Id barneyId = newId();

        String barneyFieldName = "_barneyBlock";

        train_getResourcesFieldName(ct, "rez");
View Full Code Here


    @Test
    public void default_id_for_block_from_field_name()
    {
        ClassTransformation ct = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        ObjectLocator locator = mockObjectLocator();

        String barneyFieldName = "_barney";

        train_getResourcesFieldName(ct, "rez");
View Full Code Here

    @Test
    public void no_annotation()
    {
        Class objectType = Runnable.class;
        AnnotationProvider provider = mockAnnotationProvider();
        ObjectLocator locator = mockObjectLocator();

        train_getAnnotation(provider, Service.class, null);

        replay();
View Full Code Here

    @Test
    public void annotation_present()
    {
        Class objectType = Runnable.class;
        AnnotationProvider provider = mockAnnotationProvider();
        ObjectLocator locator = mockObjectLocator();
        Service service = newMock(Service.class);
        String serviceId = "JiffyPop";
        Runnable instance = mockRunnable();

        train_getAnnotation(provider, Service.class, service);
View Full Code Here

        AliasManager manager = newAliasManager();
        AliasManager overridesManager = newAliasManager();
        AnnotationProvider annotationProvider = mockAnnotationProvider();

        ObjectLocator locator = mockObjectLocator();
        Runnable r = mockRunnable();

        Map<Class, Object> configuration = newMap();
        configuration.put(Runnable.class, r);
View Full Code Here

        AliasManager manager = newAliasManager();
        AliasManager overridesManager = newAliasManager();
        AnnotationProvider annotationProvider = mockAnnotationProvider();

        ObjectLocator locator = mockObjectLocator();
        Runnable r = mockRunnable();
        Runnable override = mockRunnable();

        Map<Class, Object> configuration = newMap();
        configuration.put(Runnable.class, r);
View Full Code Here

        AliasManager manager = newAliasManager();
        AliasManager overridesManager = newAliasManager();
        AnnotationProvider annotationProvider = mockAnnotationProvider();

        ObjectLocator locator = mockObjectLocator();

        train_getAliasesForMode(manager, mode, emptyMap);
        train_getAliasesForMode(overridesManager, mode, emptyMap);

        replay();
View Full Code Here

{
    @Test
    public void object_found()
    {
        MasterObjectProvider master = mockMasterObjectProvider();
        ObjectLocator locator = mockObjectLocator();
        ClassTransformation ct = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        Request injected = mockRequest();

        expect(master.provide(eq(Request.class), isA(AnnotationProvider.class), eq(locator), eq(false))).andReturn(
View Full Code Here

    @Test
    public void object_not_found()
    {
        MasterObjectProvider master = mockMasterObjectProvider();
        ObjectLocator locator = mockObjectLocator();
        ClassTransformation ct = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();

        expect(master.provide(eq(Request.class), isA(AnnotationProvider.class), eq(locator), eq(false))).andReturn(
                null);
View Full Code Here

    {
        ApplicationStatePersistenceStrategy strategy = mockApplicationStatePersistenceStrategy();
        ApplicationStatePersistenceStrategySource source = mockApplicationStatePersistenceStrategySource();
        Class asoClass = ReadOnlyBean.class;
        final Holder holder = new Holder();
        ObjectLocator locator = mockObjectLocator();

        train_get(source, ApplicationStateManagerImpl.DEFAULT_STRATEGY, strategy);


        IAnswer answer = new IAnswer()
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ioc.ObjectLocator

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.