Examples of TestProxyOid


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

        resetIdentityMap();
    }

    public void testGetObjectByOidWhenEmpty() {
        final ObjectSpecification spec = system.getSpecification(TestPojo.class);
        final Oid oid = new TestProxyOid(10, true);
        try {
            store.getObject(oid, spec);
            fail();
        } catch (final ObjectNotFoundException expected) {
        }
View Full Code Here

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

    private TestProxyOid registerService15() {
        return registerService(15);
    }

    private TestProxyOid registerService(final int id) {
        final TestProxyOid oid = new TestProxyOid(id);
        store.registerService("service name", oid);
        resetIdentityMap();
        return oid;
    }
View Full Code Here

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

public class TestProxyOid_ValueType extends ValueTypeContractTestAbstract<TestProxyOid> {

    @Override
    protected List<TestProxyOid> getObjectsWithSameValue() {
        return Arrays.asList(new TestProxyOid(1, true), new TestProxyOid(1, true));
    }
View Full Code Here

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

        return Arrays.asList(new TestProxyOid(1, true), new TestProxyOid(1, true));
    }

    @Override
    protected List<TestProxyOid> getObjectsWithDifferentValue() {
        return Arrays.asList(new TestProxyOid(1, false), new TestProxyOid(2, true));
    }
View Full Code Here

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

        assertEquals(ResolveState.TRANSIENT, adapter.getResolveState());
    }

    @Test
    public void testOid() throws Exception {
        assertEquals(new TestProxyOid(1, false), oid);
    }
View Full Code Here

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

    public void test2ndPersistentCreationHasDifferentOid() {
        final TestPojo pojo = new TestPojo();
        final ObjectAdapter adapter2 = system.createTransientTestObject(pojo);

        assertNotNull(adapter2);
        assertEquals(new TestProxyOid(2, false), adapter2.getOid());
    }
View Full Code Here

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

    public void test2ndPersistentCreationHasDifferentOid() {
        final TestPojo pojo = new TestPojo();
        final ObjectAdapter adapter2 = system.createPersistentTestObject(pojo);

        assertNotNull(adapter2);
        assertEquals(new TestProxyOid(90001, true), adapter2.getOid());
    }
View Full Code Here

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

        assertNotNull(adapter2);
        assertEquals(new TestProxyOid(90001, true), adapter2.getOid());
    }

    public void testOidChanged() throws Exception {
        assertEquals(new TestProxyOid(90000, true), oid);
    }
View Full Code Here

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

        assertEquals(new TestProxyOid(90000, true), oid);
    }

    public void testOidHasPrevious() throws Exception {
        assertNotNull(oid.getPrevious());
        assertEquals(new TestProxyOid(1, false), oid.getPrevious());
    }
View Full Code Here

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

        system.shutdown();
    }

    @Test
    public void testRestoreCreatesNewAdapter() {
        final DummyObjectData data = new DummyObjectData(new TestProxyOid(5, true), Movie.class.getName(), true, new TestProxyVersion(3));
        final DummyEncodeableObjectData name = new DummyEncodeableObjectData("ET", "java.lang.String");
        final DummyNullValue reference = new DummyNullValue(Person.class.getName());
        // note - the order of the fields is by name, not the order that are
        // defined in the specification
        data.setFieldContent(new Data[] { reference, name });

        final ObjectAdapter object = encoder.decode(data);

        assertTrue(object.getObject() instanceof Movie);

        final Movie movie = (Movie) object.getObject();
        assertEquals("ET", movie.getName());
        assertEquals(new TestProxyOid(5, true), object.getOid());
        assertEquals(new TestProxyVersion(3), object.getVersion());

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