Package org.apache.isis.runtimes.dflt.runtime.testsystem

Examples of org.apache.isis.runtimes.dflt.runtime.testsystem.TestProxyAdapter


        assertEquals("one", instances[2].titleString());
        assertEquals("four", instances[3].titleString());
    }

    private ObjectAdapter object(final String string) {
        final TestProxyAdapter object = new TestProxyAdapter();
        object.setupTitleString(string);
        return object;
    }
View Full Code Here


        IsisContext.openSession(new ExplorationSession());

        notifier = new ExposedViewUpdateNotifier();

        object = new TestProxyAdapter();
    }
View Full Code Here

            public ObjectAdapter createAdapter(final Object pojo, final Oid oid) {
                final ObjectSpecification specification = reflector.loadSpecification(pojo.getClass());
                final ResolveState state =
                    oid == null ? ResolveState.VALUE : oid.isTransient() ? ResolveState.TRANSIENT : ResolveState.GHOST;

                final TestProxyAdapter objectAdapter = new TestProxyAdapter();
                objectAdapter.setupResolveState(state);
                objectAdapter.setupObject(pojo);
                objectAdapter.setupOid(oid);
                objectAdapter.setupSpecification(specification);

                adapters.put(pojo, objectAdapter);

                return objectAdapter;
            }
View Full Code Here

        // objects
        configuration = new TestProxyConfiguration();
        spec = new TestProxySpecification(this.getClass());
        spec.fields = Collections.emptyList();
        adapter = new TestProxyAdapter();
        adapter.setupSpecification(spec);
        adapter.setOptimisticLock(new SerialNumberVersion(23, null, null));
        adapter.setupOid(SerialOid.createPersistent(1));
        persistenceHelper = new ObjectStorePersistenceHelper(spec);
        transaction = null;
View Full Code Here

                mockSpecificationLookup, mockAdapterManager, mockQuerySubmitter), mockServicesProvider);
    }

    @Test
    public void testExecutePassedOnToPeer() {
        final TestProxyAdapter target = new TestProxyAdapter();
        target.setupSpecification(new TestSpecification());
        final ObjectAdapter[] parameters = new ObjectAdapter[2];

        final TestProxyAdapter result = new TestProxyAdapter();
        final ActionInvocationFacet facet = new ActionInvocationFacetAbstract(mockFacetedMethod) {
            @Override
            public ObjectAdapter invoke(final ObjectAdapter target, final ObjectAdapter[] parameters) {
                return result;
            }
View Full Code Here

            }

        });
        spec.setupFields(fields);

        fieldsObject = new TestProxyAdapter();
        fieldsObject.setupResolveState(ResolveState.TRANSIENT);
        fieldsObject.setupSpecification(system.getSpecification(String.class));

        adder = new PersistedObjectAdderSpy();
    }
View Full Code Here

        IsisContext.openSession(new ExplorationSession());

        notifier = new ExposedViewUpdateNotifier();

        object = new TestProxyAdapter();
    }
View Full Code Here

        return "";
    }

    @Override
    public ObjectAdapter get(final ObjectAdapter fromObject) {
        final TestProxyAdapter adapter = new TestProxyAdapter();
        final String object = getMovie(fromObject).getName();
        adapter.setupObject(object);
        return adapter;
    }
View Full Code Here

        return "";
    }

    @Override
    public ObjectAdapter get(final ObjectAdapter fromObject) {
        final TestProxyAdapter adapter = new TestProxyAdapter();
        adapter.setupObject(getPerson(fromObject).getName());
        return adapter;
    }
View Full Code Here

        // The remote interface is asked for instances, which are returned as data objects
        final DummyObjectData instanceData =
            new DummyObjectData(new TestProxyOid(12, true), Movie.class.getName(), true, new TestProxyVersion(3));

        // The data then needs to be decoded into the ObjectAdapter
        final TestProxyAdapter dummyObjectAdapter = new TestProxyAdapter();
        // new DummyOid(12, true), ResolveState.GHOST, "test");
        dummyObjectAdapter.setupObject(new Movie());
        dummyObjectAdapter.setupSpecification(new MovieSpecification());

        final PersistenceQueryData c = new TestCriteria();
        final ObjectSpecification noSpec = getSpecificationLoader().loadSpecification(Movie.class);
        final PersistenceQueryFindAllInstances criteria = new PersistenceQueryFindAllInstances(noSpec);
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.runtime.testsystem.TestProxyAdapter

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.