Class PermissionsWebserviceTest

    • Constructor Detail

      • PermissionsWebserviceTest

        public PermissionsWebserviceTest()
    • Method Detail

      • shouldReturnAllTypesAccessesForAdmin

        public void shouldReturnAllTypesAccessesForAdmin()
                                                  throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnsOtherUserPermissiondForAdmin

        public void shouldReturnsOtherUserPermissiondForAdmin()
                                                       throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnTypesAccessesForSuperGroup

        public void shouldReturnTypesAccessesForSuperGroup()
                                                    throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnTypesAccessesForUser1

        public void shouldReturnTypesAccessesForUser1()
                                               throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnTypesAccessesForGroup1

        public void shouldReturnTypesAccessesForGroup1()
                                                throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnTypesAccessesForUser2

        public void shouldReturnTypesAccessesForUser2()
                                               throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnTypesAccessesForGroup2

        public void shouldReturnTypesAccessesForGroup2()
                                                throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnTypesAccessesForUser3

        public void shouldReturnTypesAccessesForUser3()
                                               throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnTypesAccessesForSubGroup1

        public void shouldReturnTypesAccessesForSubGroup1()
                                                   throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnTypesAccessesForUser4

        public void shouldReturnTypesAccessesForUser4()
                                               throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnTypesAccessesForSubGroup2

        public void shouldReturnTypesAccessesForSubGroup2()
                                                   throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnTypesAccessesForUser5

        public void shouldReturnTypesAccessesForUser5()
                                               throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnTypesAccessesForUser6

        public void shouldReturnTypesAccessesForUser6()
                                               throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnAttributeAccessesForSuperGroup

        public void shouldReturnAttributeAccessesForSuperGroup()
                                                        throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnAttributeAccessesForUser1

        public void shouldReturnAttributeAccessesForUser1()
                                                   throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnUserOwnerAttributeAccessesForSuperGroup

        public void shouldReturnUserOwnerAttributeAccessesForSuperGroup()
                                                                 throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnUserOwnerAttributeAccessesForUser1

        public void shouldReturnUserOwnerAttributeAccessesForUser1()
                                                            throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnItemAttributesAccessesForSuperGroup

        public void shouldReturnItemAttributesAccessesForSuperGroup()
                                                             throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnItemAttributesAccessesForUser1

        public void shouldReturnItemAttributesAccessesForUser1()
                                                        throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnUserAttributesAccessesForSuperGroup

        public void shouldReturnUserAttributesAccessesForSuperGroup()
                                                             throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnUserAttributesAccessesForUser1

        public void shouldReturnUserAttributesAccessesForUser1()
                                                        throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnItemWildcardAtrAttributeAccessesForSuperGroup

        public void shouldReturnItemWildcardAtrAttributeAccessesForSuperGroup()
                                                                       throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnItemWildcardAtrAttributeAccessesForUser1

        public void shouldReturnItemWildcardAtrAttributeAccessesForUser1()
                                                                  throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnItemOwnerAttributeAccessesForGroup1

        public void shouldReturnItemOwnerAttributeAccessesForGroup1()
                                                             throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnItemOwnerAttributeAccessesForUser2

        public void shouldReturnItemOwnerAttributeAccessesForUser2()
                                                            throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnUserOwnerAttributesAccessesForGroup1

        public void shouldReturnUserOwnerAttributesAccessesForGroup1()
                                                              throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnUserOwnerAttributesAccessesForUser2

        public void shouldReturnUserOwnerAttributesAccessesForUser2()
                                                             throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnItemAttributesAccessesForGroup1

        public void shouldReturnItemAttributesAccessesForGroup1()
                                                         throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnItemAttributesAccessesForUser2

        public void shouldReturnItemAttributesAccessesForUser2()
                                                        throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnUserAttributesAccessesForGroup1

        public void shouldReturnUserAttributesAccessesForGroup1()
                                                         throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnUserAttributesAccessesForUser2

        public void shouldReturnUserAttributesAccessesForUser2()
                                                        throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnItemWildcardAttributesAccessesForGroup1

        public void shouldReturnItemWildcardAttributesAccessesForGroup1()
                                                                 throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnItemWildcardAttributesAccessesForUser2

        public void shouldReturnItemWildcardAttributesAccessesForUser2()
                                                                throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnItemOwnerAttributeAccessesForGroup2

        public void shouldReturnItemOwnerAttributeAccessesForGroup2()
                                                             throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnItemOwnerAttributeAccessesForUser3

        public void shouldReturnItemOwnerAttributeAccessesForUser3()
                                                            throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnUserOwnerAttributeAccessesForGroup2

        public void shouldReturnUserOwnerAttributeAccessesForGroup2()
                                                             throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnUserOwnerAttributeAccessesForUser3

        public void shouldReturnUserOwnerAttributeAccessesForUser3()
                                                            throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnItemAttributesAccessesForGroup2

        public void shouldReturnItemAttributesAccessesForGroup2()
                                                         throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnItemAttributesAccessesForUser3

        public void shouldReturnItemAttributesAccessesForUser3()
                                                        throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnUserAttributesAccessesForGroup2

        public void shouldReturnUserAttributesAccessesForGroup2()
                                                         throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnUserAttributesAccessesForUser3

        public void shouldReturnUserAttributesAccessesForUser3()
                                                        throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnItemWildcardAttributeAccessesForGroup2

        public void shouldReturnItemWildcardAttributeAccessesForGroup2()
                                                                throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnItemWildcardAttributeAccessesForUser3

        public void shouldReturnItemWildcardAttributeAccessesForUser3()
                                                               throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnGlobalPermissionForSubgroup2

        public void shouldReturnGlobalPermissionForSubgroup2()
                                                      throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnGlobalPermissionForUser5

        public void shouldReturnGlobalPermissionForUser5()
                                                  throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturn403WhenUser1AccessGroup1Global

        public void shouldReturn403WhenUser1AccessGroup1Global()
      • shouldReturn403WhenUser1AccessUser5Global

        public void shouldReturn403WhenUser1AccessUser5Global()
      • shouldReturn403WhenUser1AccessUser5Type

        public void shouldReturn403WhenUser1AccessUser5Type()
      • shouldReturn403WhenUser1AccessGroup1Type

        public void shouldReturn403WhenUser1AccessGroup1Type()
      • shouldReturn403WhenUser1AccessUser5Attributes

        public void shouldReturn403WhenUser1AccessUser5Attributes()
      • shouldReturn403WhenUser1AccessGroupAttributes

        public void shouldReturn403WhenUser1AccessGroupAttributes()
      • shouldReturn200WhenUser5AccessSupergroupGlobal

        public void shouldReturn200WhenUser5AccessSupergroupGlobal()
      • shouldReturn200WhenUser5AccessGroup2Global

        public void shouldReturn200WhenUser5AccessGroup2Global()
      • shouldReturn200WhenUser5AccessSubgroup2Global

        public void shouldReturn200WhenUser5AccessSubgroup2Global()
      • shouldReturn200WhenUser5AccessSupergroupType

        public void shouldReturn200WhenUser5AccessSupergroupType()
      • shouldReturn200WhenUser5AccessGroup2Type

        public void shouldReturn200WhenUser5AccessGroup2Type()
      • shouldReturn200WhenUser5AccessSubgroup2Type

        public void shouldReturn200WhenUser5AccessSubgroup2Type()
      • shouldReturn200WhenUser5AccessSupergroupAttributes

        public void shouldReturn200WhenUser5AccessSupergroupAttributes()
      • shouldReturn200WhenUser5AccessGroup2Attributes

        public void shouldReturn200WhenUser5AccessGroup2Attributes()
      • shouldReturn200WhenEmployeemanager5AccessGroup2Attributes

        public void shouldReturn200WhenEmployeemanager5AccessGroup2Attributes()
      • shouldReturn200WhenUser5AccessSubgroup2

        public void shouldReturn200WhenUser5AccessSubgroup2()
      • shouldFailValidationForAttributes

        public void shouldFailValidationForAttributes()
      • shouldReturnGlobalPermissionsIdOnlyWhenFieldsSetToBasic

        public void shouldReturnGlobalPermissionsIdOnlyWhenFieldsSetToBasic()
                                                                     throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnGlobalPermissionsIdOnlyWhenFieldsSetToId

        public void shouldReturnGlobalPermissionsIdOnlyWhenFieldsSetToId()
                                                                  throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnGlobalPermissionsAllFieldsWhenFieldsSetToFull

        public void shouldReturnGlobalPermissionsAllFieldsWhenFieldsSetToFull()
                                                                       throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnGlobalPermissions400WhenFieldsSetIncorrectly

        public void shouldReturnGlobalPermissions400WhenFieldsSetIncorrectly()
      • shouldReturnAttributesPermissionsIdOnlyWhenFieldsSetToBasic

        public void shouldReturnAttributesPermissionsIdOnlyWhenFieldsSetToBasic()
                                                                         throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnAttributesPermissionsIdOnlyWhenFieldsSetToId

        public void shouldReturnAttributesPermissionsIdOnlyWhenFieldsSetToId()
                                                                      throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnAttributesPermissionsAllFieldsWhenFieldsSetToFull

        public void shouldReturnAttributesPermissionsAllFieldsWhenFieldsSetToFull()
                                                                           throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnAttributesPermissions400WhenFieldsSetIncorrectly

        public void shouldReturnAttributesPermissions400WhenFieldsSetIncorrectly()
      • shouldReturnTypesPermissionsIdOnlyWhenFieldsSetToBasic

        public void shouldReturnTypesPermissionsIdOnlyWhenFieldsSetToBasic()
                                                                    throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnTypesPermissionsIdOnlyWhenFieldsSetToId

        public void shouldReturnTypesPermissionsIdOnlyWhenFieldsSetToId()
                                                                 throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnTypesPermissionsAllFieldsWhenFieldsSetToFull

        public void shouldReturnTypesPermissionsAllFieldsWhenFieldsSetToFull()
                                                                      throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnTypesPermissions400WhenFieldsSetIncorrectly

        public void shouldReturnTypesPermissions400WhenFieldsSetIncorrectly()
      • shouldReturn403WhenUser1AccessGroup1Catalogs

        public void shouldReturn403WhenUser1AccessGroup1Catalogs()
      • shouldReturn400WhenNoCatalogIsPassed

        public void shouldReturn400WhenNoCatalogIsPassed()
      • shouldReturn400WhenNoVersionIsPassed

        public void shouldReturn400WhenNoVersionIsPassed()
      • shouldReturnReadPermissionsFor1CatalogVersion

        public void shouldReturnReadPermissionsFor1CatalogVersion()
                                                           throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnReadPermissionsFor2CatalogVersion

        public void shouldReturnReadPermissionsFor2CatalogVersion()
                                                           throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnReadPermissionsFor2Catalogs

        public void shouldReturnReadPermissionsFor2Catalogs()
                                                     throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturnWritePermissionsFor1CatalogVersion

        public void shouldReturnWritePermissionsFor1CatalogVersion()
                                                            throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • shouldReturn400WithLocalizedErrorMessageInEnglish

        public void shouldReturn400WithLocalizedErrorMessageInEnglish()
      • shouldReturn400WithLocalizedErrorMessageInGerman

        public void shouldReturn400WithLocalizedErrorMessageInGerman()
      • testOptionsRequest

        public void testOptionsRequest()
      • retrieveAttributesPermissions

        protected PermissionsListWsDTO retrieveAttributesPermissions​(java.lang.String principal,
                                                                     java.lang.String user,
                                                                     java.lang.String attributes)
                                                              throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • retrieveAttributesPermissions

        protected PermissionsListWsDTO retrieveAttributesPermissions​(java.lang.String principal,
                                                                     java.lang.String user,
                                                                     java.lang.String attributes,
                                                                     java.lang.String fields)
                                                              throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • retrieveAttributesPermissionsResponse

        protected javax.ws.rs.core.Response retrieveAttributesPermissionsResponse​(java.lang.String principal,
                                                                                  java.lang.String user,
                                                                                  java.lang.String attributes)
      • retrieveAttributesPermissionsResponseInLanguage

        protected javax.ws.rs.core.Response retrieveAttributesPermissionsResponseInLanguage​(java.lang.String principal,
                                                                                            java.lang.String user,
                                                                                            java.lang.String attributes,
                                                                                            java.util.Locale language)
      • retrieveAttributesPermissionsResponse

        protected javax.ws.rs.core.Response retrieveAttributesPermissionsResponse​(java.lang.String principal,
                                                                                  java.lang.String user,
                                                                                  java.lang.String attributes,
                                                                                  java.lang.String fields)
      • retrieveTypesPermissions

        protected PermissionsListWsDTO retrieveTypesPermissions​(java.lang.String principal,
                                                                java.lang.String user,
                                                                java.lang.String types)
                                                         throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • retrieveTypesPermissions

        protected PermissionsListWsDTO retrieveTypesPermissions​(java.lang.String principal,
                                                                java.lang.String user,
                                                                java.lang.String types,
                                                                java.lang.String password)
                                                         throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • retrieveTypesPermissions

        protected PermissionsListWsDTO retrieveTypesPermissions​(java.lang.String principal,
                                                                java.lang.String user,
                                                                java.lang.String types,
                                                                java.lang.String password,
                                                                java.lang.String fields)
                                                         throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • retrieveTypesPermissionsResponse

        protected javax.ws.rs.core.Response retrieveTypesPermissionsResponse​(java.lang.String principal,
                                                                             java.lang.String user,
                                                                             java.lang.String types,
                                                                             java.lang.String password)
      • retrieveTypesPermissionsResponse

        protected javax.ws.rs.core.Response retrieveTypesPermissionsResponse​(java.lang.String principal,
                                                                             java.lang.String user,
                                                                             java.lang.String types,
                                                                             java.lang.String password,
                                                                             java.lang.String fields)
      • retrieveGlobalPermissions

        protected PermissionsWsDTO retrieveGlobalPermissions​(java.lang.String principal,
                                                             java.lang.String user)
                                                      throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • retrieveGlobalPermissions

        protected PermissionsWsDTO retrieveGlobalPermissions​(java.lang.String principal,
                                                             java.lang.String user,
                                                             java.lang.String fields)
                                                      throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • retrieveGlobalPermissionsResponse

        protected javax.ws.rs.core.Response retrieveGlobalPermissionsResponse​(java.lang.String principal,
                                                                              java.lang.String user)
      • retrieveGlobalPermissionsResponse

        protected javax.ws.rs.core.Response retrieveGlobalPermissionsResponse​(java.lang.String principal,
                                                                              java.lang.String user,
                                                                              java.lang.String fields)
      • retrieveCatalogVersionPermissions

        protected CatalogPermissionsListWsDTO retrieveCatalogVersionPermissions​(java.lang.String principal,
                                                                                java.lang.String user,
                                                                                java.lang.String catalogIds,
                                                                                java.lang.String catalogVersions)
                                                                         throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException
      • retrieveCatalogVersionPermissionsResponse

        protected javax.ws.rs.core.Response retrieveCatalogVersionPermissionsResponse​(java.lang.String principal,
                                                                                      java.lang.String user,
                                                                                      java.lang.String catalogIds,
                                                                                      java.lang.String catalogVersions)
      • generateExpectedPermissionsWsDTO

        protected PermissionsWsDTO generateExpectedPermissionsWsDTO​(java.lang.String id,
                                                                    java.util.Map<java.lang.String,​java.lang.String> permissions)
      • generateExpectedCatalogPermissionsWsDTO

        protected CatalogPermissionsWsDTO generateExpectedCatalogPermissionsWsDTO​(java.lang.String catalogId,
                                                                                  java.lang.String catalogVersion,
                                                                                  java.util.Map<java.lang.String,​java.lang.String> permissions)
      • unmarshallResult

        protected <C> C unmarshallResult​(javax.ws.rs.core.Response result,
                                         java.lang.Class<C> c)
                                  throws javax.xml.bind.JAXBException
        Throws:
        javax.xml.bind.JAXBException