Class ExplicitCrossOrganizationReference


  • public class ExplicitCrossOrganizationReference
    extends CrossOrganizationReference
    Test cases covering special cases for cross organization references, where they are allowed based on ad_column.allowed_cross_org_link setting.
    Author:
    alostale
    • Constructor Detail

      • ExplicitCrossOrganizationReference

        public ExplicitCrossOrganizationReference()
    • Method Detail

      • shouldBeIllegalOnInsert

        public void shouldBeIllegalOnInsert()
        References from org Spain to USA should not be allowed on insertion even in a column allowing it if not in admin mode
      • shouldBeIllegalOnUpdate

        public void shouldBeIllegalOnUpdate()
        References from org Spain to USA should not be allowed on update even in a column allowing it if not in admin mode
      • shouldBeAllowedOnInsertInCrossOrgAdminMode

        public void shouldBeAllowedOnInsertInCrossOrgAdminMode()
        References from org Spain to USA should be allowed on insertion if in cross org admin mode for columns that allow it
      • shouldBeAllowedOnUpdateInCrossOrgAdminMode

        public void shouldBeAllowedOnUpdateInCrossOrgAdminMode()
        References from org Spain to USA should not be allowed on update if in cross org admin mode for columns that allow it
      • shouldBeIllegalOnInsertAdminModeIfColumnNotSet

        public void shouldBeIllegalOnInsertAdminModeIfColumnNotSet()
        For columns not flagged to allow cross org refs, it should not be possible to do it even in cross org admin mode
      • shouldBeIllegalOnUpdateAdminModeIfColumnNotSet

        public void shouldBeIllegalOnUpdateAdminModeIfColumnNotSet()
        For columns not flagged to allow cross org refs, it should not be possible to do it even in cross org admin mode
      • shouldBeIllegalOnChildInsert

        public void shouldBeIllegalOnChildInsert()
      • shouldBeIllegalOnChildUpdate

        public void shouldBeIllegalOnChildUpdate()
      • shouldBeAllowedOnChildInsertInOrgAdminMode

        public void shouldBeAllowedOnChildInsertInOrgAdminMode()
      • shouldBeAllowedOnChildUpdateInOrgAdminMode

        public void shouldBeAllowedOnChildUpdateInOrgAdminMode()
      • childListShouldBeRetrivedIfRoleHasAccess

        public void childListShouldBeRetrivedIfRoleHasAccess()
        Fetching children (order.getOrderLineList) should retrieve cross-org elements if role has access to children org
      • childListShouldBeRetrivedEvenIfRoleHasNoAccess

        public void childListShouldBeRetrivedEvenIfRoleHasNoAccess()
        When fetching children elements (order.getOrderLineList), children's organization is not checked, so even they are cross-org and the role has no access to them, they are present in the bag.
      • byDefaultCrossOrgAdminShouldBeDisabled

        public void byDefaultCrossOrgAdminShouldBeDisabled()
      • crossOrgAdminModeShoudBePossibleToEnable

        public void crossOrgAdminModeShoudBePossibleToEnable()
      • crossOrgAdminShouldWorkAsAnStack

        public void crossOrgAdminShouldWorkAsAnStack()
      • adminAndCrossOrgAdminAreIndependent

        public void adminAndCrossOrgAdminAreIndependent()
      • unbalancedRestorePreviousCrossOrgAdminShouldLogWarn

        public void unbalancedRestorePreviousCrossOrgAdminShouldLogWarn()
      • unbalancedRestorePreviousCrossOrgAdminShouldLogStackIfEnabled

        public void unbalancedRestorePreviousCrossOrgAdminShouldLogStackIfEnabled()
      • orderLineDSShouldShowAllChildren

        public void orderLineDSShouldShowAllChildren()
                                              throws Exception
        Creates an order in org Spain with 2 lines: 1 in Spain another in USA. Then fetches OrderLine data source with QA Admin role which has access to both organizations, so both lines should be retrieved
        Throws:
        Exception
      • orderLineDSShouldHideNonAccessibleChildren

        public void orderLineDSShouldHideNonAccessibleChildren()
                                                        throws Exception
        Creates same order than orderLineDSShouldShowAllChildren(). Fetch is done with role with access to only Spain, so only 1 line is expected to be retrieved. Note this test will be needed to be changed in case cross org references is also implemented for the UI.
        Throws:
        Exception
      • itShouldntBeAllowedToSetCrossOrgIfModNotInDev

        public void itShouldntBeAllowedToSetCrossOrgIfModNotInDev()
        Cross org column value cannot changed if column's module is not in dev. The opposite (value can be changed if mod in dev), is implicitly tested in @BeforeClass method.
      • setUpAllowedCrossOrg

        public static void setUpAllowedCrossOrg()
                                         throws Exception
        Throws:
        Exception