Class PermissionsSearchWebserviceTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.ServicelayerTest
de.hybris.platform.permissionswebservices.controllers.AbstractPermissionsWebServicesTest
de.hybris.platform.permissionswebservices.controllers.PermissionsSearchWebserviceTest
- All Implemented Interfaces:
JaloSessionHolder
@IntegrationTest
public class PermissionsSearchWebserviceTest
extends AbstractPermissionsWebServicesTest
-
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importServiceFields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanareCatalogPermissionsWsDTOEquals(CatalogPermissionsWsDTO expected, CatalogPermissionsWsDTO tested) static voidassertEqualsCatalogPermissionsListWsDTO(CatalogPermissionsListWsDTO expected, CatalogPermissionsListWsDTO tested) static voidassertEqualsPermissionsListWsDTO(PermissionsListWsDTO expected, PermissionsListWsDTO tested) static voidassertEqualsPermissionsWsDTO(PermissionsWsDTO expected, PermissionsWsDTO tested) protected CatalogPermissionsWsDTOgenerateExpectedCatalogPermissionsWsDTO(String catalogId, String catalogVersion, Map<String, String> permissions) protected PermissionsWsDTOgenerateExpectedPermissionsWsDTO(String id, Map<String, String> permissions) voidprotected PermissionsListWsDTOretrieveAttributesPermissions(String principal, String user, String attributes) protected PermissionsListWsDTOretrieveAttributesPermissions(String principal, String user, String attributes, String fields) protected javax.ws.rs.core.ResponseretrieveAttributesPermissionsResponse(String principal, String user, String attributes) protected javax.ws.rs.core.ResponseretrieveAttributesPermissionsResponse(String principal, String user, String attributes, String fields) protected javax.ws.rs.core.ResponseretrieveAttributesPermissionsResponseInLanguage(String principal, String user, String attributes, Locale language) protected CatalogPermissionsListWsDTOretrieveCatalogVersionPermissions(String principal, String user, String catalogIds, String catalogVersions) protected javax.ws.rs.core.ResponseretrieveCatalogVersionPermissionsResponse(String principal, String user, String catalogIds, String catalogVersions) protected PermissionsWsDTOretrieveGlobalPermissions(String principal, String user) protected PermissionsWsDTOretrieveGlobalPermissions(String principal, String user, String fields) protected javax.ws.rs.core.ResponseretrieveGlobalPermissionsResponse(String principal, String user) protected javax.ws.rs.core.ResponseretrieveGlobalPermissionsResponse(String principal, String user, String fields) protected PermissionsListWsDTOretrieveTypesPermissions(String principal, String user, String types) protected PermissionsListWsDTOretrieveTypesPermissions(String principal, String user, String types, String password) protected PermissionsListWsDTOretrieveTypesPermissions(String principal, String user, String types, String password, String fields) protected javax.ws.rs.core.ResponseretrieveTypesPermissionsResponse(String principal, String user, String types, String password) protected javax.ws.rs.core.ResponseretrieveTypesPermissionsResponse(String principal, String user, String types, String password, String fields) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidprotected <C> CunmarshallResult(javax.ws.rs.core.Response result, Class<C> c) Methods inherited from class de.hybris.platform.permissionswebservices.controllers.AbstractPermissionsWebServicesTest
insertGlobalPermission, isGetPermissionsTestEnabledMethods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNoneMethods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSessionMethods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
Constructor Details
-
PermissionsSearchWebserviceTest
public PermissionsSearchWebserviceTest()
-
-
Method Details
-
importTestData
- Throws:
ImpExException
-
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() -
shouldReturn403WhenNoCatalogIsPassed
public void shouldReturn403WhenNoCatalogIsPassed() -
shouldReturn403WhenNoVersionIsPassed
public void shouldReturn403WhenNoVersionIsPassed() -
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(String principal, String user, String attributes) throws javax.xml.bind.JAXBException - Throws:
javax.xml.bind.JAXBException
-
retrieveAttributesPermissions
protected PermissionsListWsDTO retrieveAttributesPermissions(String principal, String user, String attributes, String fields) throws javax.xml.bind.JAXBException - Throws:
javax.xml.bind.JAXBException
-
retrieveAttributesPermissionsResponse
-
retrieveAttributesPermissionsResponseInLanguage
-
retrieveAttributesPermissionsResponse
-
retrieveTypesPermissions
protected PermissionsListWsDTO retrieveTypesPermissions(String principal, String user, String types) throws javax.xml.bind.JAXBException - Throws:
javax.xml.bind.JAXBException
-
retrieveTypesPermissions
protected PermissionsListWsDTO retrieveTypesPermissions(String principal, String user, String types, String password) throws javax.xml.bind.JAXBException - Throws:
javax.xml.bind.JAXBException
-
retrieveTypesPermissions
protected PermissionsListWsDTO retrieveTypesPermissions(String principal, String user, String types, String password, String fields) throws javax.xml.bind.JAXBException - Throws:
javax.xml.bind.JAXBException
-
retrieveTypesPermissionsResponse
-
retrieveTypesPermissionsResponse
-
retrieveGlobalPermissions
protected PermissionsWsDTO retrieveGlobalPermissions(String principal, String user) throws javax.xml.bind.JAXBException - Throws:
javax.xml.bind.JAXBException
-
retrieveGlobalPermissions
protected PermissionsWsDTO retrieveGlobalPermissions(String principal, String user, String fields) throws javax.xml.bind.JAXBException - Throws:
javax.xml.bind.JAXBException
-
retrieveGlobalPermissionsResponse
-
retrieveGlobalPermissionsResponse
-
retrieveCatalogVersionPermissions
protected CatalogPermissionsListWsDTO retrieveCatalogVersionPermissions(String principal, String user, String catalogIds, String catalogVersions) throws javax.xml.bind.JAXBException - Throws:
javax.xml.bind.JAXBException
-
retrieveCatalogVersionPermissionsResponse
-
generateExpectedPermissionsWsDTO
protected PermissionsWsDTO generateExpectedPermissionsWsDTO(String id, Map<String, String> permissions) -
generateExpectedCatalogPermissionsWsDTO
-
assertEqualsPermissionsListWsDTO
public static void assertEqualsPermissionsListWsDTO(PermissionsListWsDTO expected, PermissionsListWsDTO tested) -
assertEqualsPermissionsWsDTO
-
assertEqualsCatalogPermissionsListWsDTO
public static void assertEqualsCatalogPermissionsListWsDTO(CatalogPermissionsListWsDTO expected, CatalogPermissionsListWsDTO tested) -
areCatalogPermissionsWsDTOEquals
public static boolean areCatalogPermissionsWsDTOEquals(CatalogPermissionsWsDTO expected, CatalogPermissionsWsDTO tested) -
unmarshallResult
protected <C> C unmarshallResult(javax.ws.rs.core.Response result, Class<C> c) throws javax.xml.bind.JAXBException - Throws:
javax.xml.bind.JAXBException
-