Package org.apache.isis.runtimes.dflt.remoting.common.data

Examples of org.apache.isis.runtimes.dflt.remoting.common.data.DummyReferenceData


        final TestProxyAdapter object = new TestProxyAdapter();
        object.setupOid(new TestProxyOid(5));
        object.setupResolveState(ResolveState.GHOST);

        final IdentityData identityData = new DummyReferenceData();
        final ObjectData objectData = new DummyObjectData();
        final ResolveObjectRequest request = new ResolveObjectRequest(session, identityData);

        mockery.checking(new Expectations() {
            {
View Full Code Here


            }

            private DummyObjectData encoderShouldCreateGraphForChangedMovie(final TestProxyAdapter movieAdapter) {
                final DummyObjectData movieData = new DummyObjectData(new TestProxyOid(12, true), Movie.class.getName(), true, new TestProxyVersion(4));
                final DummyEncodeableObjectData expectedMovieName = new DummyEncodeableObjectData("War of the Worlds", String.class.getName());
                final DummyReferenceData expectedDirectorRef = new DummyReferenceData(new TestProxyOid(14, true), Person.class.getName(), new TestProxyVersion(8));
                movieData.setFieldContent(new Data[] { expectedDirectorRef, expectedMovieName });

                one(mockEncoder).encodeGraphForChangedObject(movieAdapter, new KnownObjectsRequest());
                will(returnValue(movieData));
                return movieData;
View Full Code Here

        mockery.checking(new Expectations() {
            {
                // this returns results data with new oid and version
                final TestProxyOid newOid = new TestProxyOid(123, true);
                newOid.setupPrevious(previousOid);
                final DummyReferenceData updateData = new DummyReferenceData(newOid, "type", new TestProxyVersion(456));

                // the server is called with data (movieData) for the object to
                // be persisted
                one(mockDistribution).executeClientAction(with(any(ExecuteClientActionRequest.class)));
View Full Code Here

        final TestProxySpecification spec = (TestProxySpecification) object.getSpecification();
        nameField = new TestProxyAssociation("name", system.getSpecification(String.class));
        spec.setupFields(Arrays.asList((ObjectAssociation) nameField));

        movieData = new DummyReferenceData(object.getOid(), "none", new TestProxyVersion(1));

    }
View Full Code Here

        authenticationSession = IsisContext.getAuthenticationSession();

        movieAdapter = system.createPersistentTestObject();
        final Oid movieOid = movieAdapter.getOid();

        movieData = new DummyReferenceData(movieOid, "none", movieAdapter.getVersion());

        final TestProxySpecification spec = (TestProxySpecification) movieAdapter.getSpecification();
        nameField = new TestProxyAssociation("director", system.getSpecification(String.class));
        spec.setupFields(Arrays.asList((ObjectAssociation) nameField));

        personAdapter = system.createPersistentTestObject();
        final Oid personOid = personAdapter.getOid();

        personData = new DummyReferenceData(personOid, "none", personAdapter.getVersion());
    }
View Full Code Here

        final ObjectAdapter object = system.createPersistentTestObject();

        final ExecuteServerActionRequest request = new ExecuteServerActionRequest(IsisContext.getAuthenticationSession(), ActionType.USER, identifierString, targetData, parameterData);
        mockDistribution.executeServerAction(request);
        final ReferenceData[] disposedReferenceData = new ReferenceData[] { new DummyReferenceData(object.getOid(), object.getSpecification().getFullIdentifier(), null) };
        final ExecuteServerActionResponse result = new ExecuteServerActionResponse(new DummyNullValue("type"), new ObjectData[0], disposedReferenceData, null, new ObjectData[2], new String[0], new String[0]);
        expectLastCall().andReturn(result);

        replay(mockObjectActionPeer, mockEncoder, mockDistribution);
        proxy.invoke(target, parameters);
View Full Code Here

    public void testExecuteWhereObjectDeleted() {
        final ExecuteServerActionResponse results = null;

        mockery.checking(new Expectations() {
            {
                final ReferenceData deletedObjectIdentityData = new DummyReferenceData(adapter.getOid(), "", adapter.getVersion());
                one(mockEncoder).encodeIdentityData(adapter);
                will(returnValue(deletedObjectIdentityData));

                one(mockEncoder).encodeServerActionResult(with(equalTo(adapter)), with(equalTo(new ObjectData[0])), with(equalTo(new ReferenceData[] { deletedObjectIdentityData })), with(nullValue(ObjectData.class)), with(equalTo(new ObjectData[0])), with(equalTo(new String[0])),
                        with(equalTo(new String[0])));
View Full Code Here

        final TestProxySpecification spec = (TestProxySpecification) object.getSpecification();
        nameField = new TestProxyAssociation("name", system.getSpecification(String.class));
        spec.setupFields(Arrays.asList((ObjectAssociation) nameField));

        movieData = new DummyReferenceData(object.getOid(), "none", new TestProxyVersion(1));

    }
View Full Code Here

        authenticationSession = IsisContext.getAuthenticationSession();

        movieAdapter = system.createPersistentTestObject();
        final Oid movieOid = movieAdapter.getOid();

        movieData = new DummyReferenceData(movieOid, "none", movieAdapter.getVersion());

        final TestProxySpecification spec = (TestProxySpecification) movieAdapter.getSpecification();
        nameField = new TestProxyAssociation("director", system.getSpecification(String.class));
        spec.setupFields(Arrays.asList((ObjectAssociation) nameField));

        personAdapter = system.createPersistentTestObject();
        final Oid personOid = personAdapter.getOid();

        personData = new DummyReferenceData(personOid, "none", personAdapter.getVersion());
    }
View Full Code Here

        final ExecuteServerActionResponse results = null;

        mockery.checking(new Expectations() {
            {
                final ReferenceData deletedObjectIdentityData =
                    new DummyReferenceData(adapter.getOid(), "", adapter.getVersion());
                one(mockEncoder).encodeIdentityData(adapter);
                will(returnValue(deletedObjectIdentityData));

                one(mockEncoder).encodeServerActionResult(with(equalTo(adapter)), with(equalTo(new ObjectData[0])),
                    with(equalTo(new ReferenceData[] { deletedObjectIdentityData })),
View Full Code Here

TOP

Related Classes of org.apache.isis.runtimes.dflt.remoting.common.data.DummyReferenceData

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.