Examples of TestProxyAdapter


Examples of org.apache.isis.nof.testsystem.TestProxyAdapter

public class TestViews {
    protected TestProxySystem system;

    protected ObjectAdapter createExampleObjectForView() {
        TestProxyAdapter object = new TestProxyAdapter();
        object.setupTitleString("ExampleObjectForView");
        object.setupSpecification(new TestSpecification());
        object.setupResolveState(ResolveState.GHOST);
        return object;
    }
View Full Code Here

Examples of org.apache.isis.nof.testsystem.TestProxyAdapter

    public static void main(final String[] args) {
        new TreeExample();
    }

    protected void views(final Workspace workspace) {
        TestProxyAdapter object = new TestProxyAdapter();
        object.setupSpecification(new TestSpecification());
        object.setupResolveState(ResolveState.TRANSIENT);
       
        ViewAxis axis = new TreeBrowserFrame(null, null);

        Content content = new RootObject(object);
View Full Code Here

Examples of org.apache.isis.nof.testsystem.TestProxyAdapter

public class TestViews {
    protected TestProxySystem system;

    protected ObjectAdapter createExampleObjectForView() {
        TestProxyAdapter object = new TestProxyAdapter();
        object.setupTitleString("ExampleObjectForView");
        object.setupSpecification(new TestSpecification());
        object.setupResolveState(ResolveState.GHOST);
        return object;
    }
View Full Code Here

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

        // 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

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

            @Override
            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

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

        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

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

        action = new ObjectActionImpl(mockFacetedMethod, new ObjectMemberContext(mockAuthenticationSessionProvider, mockSpecificationLookup, mockAdapterManager, mockQuerySubmitter, mockCollectionTypeRegistry), 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

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

        return "";
    }

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

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

            }

        });
        spec.setupFields(fields);

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

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

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

        // 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
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.