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

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


        final ObjectAdapter movieAdapter = system.createPersistentTestObject();

        // test starts here
        mockery.checking(new Expectations() {
            {
                final DummyIdentityData identityOfObjectToDelete = encoderShouldCreateIdentityDataForMovie(movieAdapter);
                distributionShouldExecuteClientActionForDeletedMovie(identityOfObjectToDelete);
            }

            private DummyIdentityData encoderShouldCreateIdentityDataForMovie(final ObjectAdapter movieAdapter) {
                final DummyIdentityData identityOfObjectToDelete = new DummyIdentityData();

                one(mockEncoder).encodeIdentityData(movieAdapter);
                will(returnValue(identityOfObjectToDelete));
                return identityOfObjectToDelete;
            }
View Full Code Here


    }

    public void testOidForService() {
        final OidForServiceRequest request = new OidForServiceRequest(session, "domain.Service");
        serverFacade.oidForService(request);
        final IdentityData data = new DummyIdentityData();
        control.setReturnValue(new OidForServiceResponse(data));

        control.replay();
        final OidForServiceResponse response = serverFacadeProxy.oidForService(request);
        final IdentityData ret = response.getOidData();
View Full Code Here

            assertTrue(e.getMessage().startsWith("Response out of sequence"));
        }
    }

    public void testClearAssociation() {
        final DummyIdentityData target = new DummyIdentityData(new TestProxyOid(1), "class 1", null);
        final DummyIdentityData associate = new DummyIdentityData(new TestProxyOid(2), "class 2", null);
        final ClearAssociationRequest request = new ClearAssociationRequest(session, "fieldname", target, associate);
        serverFacade.clearAssociation(request);
        final ObjectData[] data = new ObjectData[2];
        control.setReturnValue(new ClearAssociationResponse(data));
View Full Code Here

    public void testExecuteClientActionFailsWithConcurrencyError() {
        final ObjectAdapter adapter = system.createPersistentTestObject();
        adapter.setOptimisticLock(new TestProxyVersion(7));

        final Oid oid = adapter.getOid();
        final DummyIdentityData identityData = new DummyIdentityData(oid, TestProxyAdapter.class.getName(), new TestProxyVersion(6));

        try {
            final ExecuteClientActionRequest request = new ExecuteClientActionRequest(new TestProxySession(), new ReferenceData[] { identityData }, new int[] { ClientTransactionEvent.DELETE });
            server.executeClientAction(request);
            fail();
View Full Code Here

    @Test
    public void testExecuteClientActionWhereObjectDeleted() {
        final ObjectAdapter adapter = system.createPersistentTestObject();

        final Oid oid = adapter.getOid();
        final DummyIdentityData identityData = new DummyIdentityData(oid, TestProxyAdapter.class.getName(), new TestProxyVersion(1));

        // return results
        final ExecuteClientActionResponse results = new ExecuteClientActionResponse(new ObjectData[0], new Version[0], null);
        mockery.checking(new Expectations() {
            {
View Full Code Here

        system.init();

        adapter = system.createPersistentTestObject();
        oid = adapter.getOid();

        targetData = new DummyIdentityData(oid, TestProxyAdapter.class.getName(), new TestProxyVersion(1));
        parameterData = new ReferenceData[] {};
        final TestProxySpecification proxySpecification = (TestProxySpecification) adapter.getSpecification();

        mockAction = mockery.mock(ObjectAction.class);
        proxySpecification.setupAction(mockAction);
View Full Code Here

    public void testExecuteClientActionFailsWithConcurrencyError() {
        final ObjectAdapter adapter = system.createPersistentTestObject();
        adapter.setOptimisticLock(new TestProxyVersion(7));

        final Oid oid = adapter.getOid();
        final DummyIdentityData identityData =
            new DummyIdentityData(oid, TestProxyAdapter.class.getName(), new TestProxyVersion(6));

        try {
            final ExecuteClientActionRequest request =
                new ExecuteClientActionRequest(new TestProxySession(), new ReferenceData[] { identityData },
                    new int[] { ClientTransactionEvent.DELETE });
View Full Code Here

    @Test
    public void testExecuteClientActionWhereObjectDeleted() {
        final ObjectAdapter adapter = system.createPersistentTestObject();

        final Oid oid = adapter.getOid();
        final DummyIdentityData identityData =
            new DummyIdentityData(oid, TestProxyAdapter.class.getName(), new TestProxyVersion(1));

        // return results
        final ExecuteClientActionResponse results =
            new ExecuteClientActionResponse(new ObjectData[0], new Version[0], null);
        mockery.checking(new Expectations() {
View Full Code Here

        system.init();

        adapter = system.createPersistentTestObject();
        oid = adapter.getOid();

        targetData = new DummyIdentityData(oid, TestProxyAdapter.class.getName(), new TestProxyVersion(1));
        parameterData = new ReferenceData[] {};
        final TestProxySpecification proxySpecification = (TestProxySpecification) adapter.getSpecification();

        mockAction = mockery.mock(ObjectAction.class);
        proxySpecification.setupAction(mockAction);
View Full Code Here

    }

    public void testOidForService() {
        final OidForServiceRequest request = new OidForServiceRequest(session, "domain.Service");
        serverFacade.oidForService(request);
        final IdentityData data = new DummyIdentityData();
        control.setReturnValue(new OidForServiceResponse(data));

        control.replay();
        final OidForServiceResponse response = serverFacadeProxy.oidForService(request);
        final IdentityData ret = response.getOidData();
View Full Code Here

TOP

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

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.