Package org.apache.isis.core.progmodel.facets.members.hide

Examples of org.apache.isis.core.progmodel.facets.members.hide.HiddenFacetImpl


    }

    @Test
    public void testVisibleWhenTargetPersistentAndHiddenFacetSetToOncePersisted() {
        testMember.addFacet(new HideForContextFacetNone(testMember));
        testMember.addFacet(new HiddenFacetImpl(When.ONCE_PERSISTED, testMember));
        assertFalse(testMember.isVisible(null, testAdapter).isAllowed());
    }
View Full Code Here


    }

    @Test
    public void testVisibleWhenTargetPersistentAndHiddenFacetSetToUntilPersisted() {
        testMember.addFacet(new HideForContextFacetNone(testMember));
        testMember.addFacet(new HiddenFacetImpl(When.UNTIL_PERSISTED, testMember));
        final Consent visible = testMember.isVisible(null, testAdapter);
        assertTrue(visible.isAllowed());
    }
View Full Code Here

    }

    @Test
    public void testVisibleWhenTargetTransientAndHiddenFacetSetToUntilPersisted() {
        testMember.addFacet(new HideForContextFacetNone(testMember));
        testMember.addFacet(new HiddenFacetImpl(When.UNTIL_PERSISTED, testMember));
        final ObjectAdapter transientTestAdapter = system.createTransientTestObject();
        assertFalse(testMember.isVisible(null, transientTestAdapter).isAllowed());
    }
View Full Code Here

    }

    @Test
    public void testVisibleWhenTargetPersistentAndHiddenFacetSetToOncePersisted() {
        testMember.addFacet(new HideForContextFacetNone(testMember));
        testMember.addFacet(new HiddenFacetImpl(When.ONCE_PERSISTED, testMember));
        assertFalse(testMember.isVisible(null, testAdapter).isAllowed());
    }
View Full Code Here

    }

    @Test
    public void testVisibleWhenTargetPersistentAndHiddenFacetSetToUntilPersisted() {
        testMember.addFacet(new HideForContextFacetNone(testMember));
        testMember.addFacet(new HiddenFacetImpl(When.UNTIL_PERSISTED, testMember));
        final Consent visible = testMember.isVisible(null, testAdapter);
        assertTrue(visible.isAllowed());
    }
View Full Code Here

    }

    @Test
    public void testVisibleWhenTargetTransientAndHiddenFacetSetToUntilPersisted() {
        testMember.addFacet(new HideForContextFacetNone(testMember));
        testMember.addFacet(new HiddenFacetImpl(When.UNTIL_PERSISTED, testMember));
        final ObjectAdapter transientTestAdapter = system.createTransientTestObject();
        assertFalse(testMember.isVisible(null, transientTestAdapter).isAllowed());
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.progmodel.facets.members.hide.HiddenFacetImpl

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.