@IntegrationTest public class PermissionsWebserviceTest extends AbstractPermissionsWebServicesTest
importServicedefaultLanguage, jaloSession| Constructor and Description |
|---|
PermissionsWebserviceTest() |
insertGlobalPermissioncreateCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNoneautowireProperties, getBeanName, prepareApplicationContextAndSessionestablishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSessionpublic void importTestData()
throws ImpExException
ImpExExceptionpublic void shouldReturnAllTypesAccessesForAdmin()
throws java.io.IOException,
javax.xml.bind.JAXBException
java.io.IOExceptionjavax.xml.bind.JAXBExceptionpublic void shouldReturnsOtherUserPermissiondForAdmin()
throws java.io.IOException,
javax.xml.bind.JAXBException
java.io.IOExceptionjavax.xml.bind.JAXBExceptionpublic void shouldReturnTypesAccessesForSuperGroup()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnTypesAccessesForUser1()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnTypesAccessesForGroup1()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnTypesAccessesForUser2()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnTypesAccessesForGroup2()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnTypesAccessesForUser3()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnTypesAccessesForSubGroup1()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnTypesAccessesForUser4()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnTypesAccessesForSubGroup2()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnTypesAccessesForUser5()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnTypesAccessesForUser6()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnAttributeAccessesForSuperGroup()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnAttributeAccessesForUser1()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnUserOwnerAttributeAccessesForSuperGroup()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnUserOwnerAttributeAccessesForUser1()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnItemAttributesAccessesForSuperGroup()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnItemAttributesAccessesForUser1()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnUserAttributesAccessesForSuperGroup()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnUserAttributesAccessesForUser1()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnItemWildcardAtrAttributeAccessesForSuperGroup()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnItemWildcardAtrAttributeAccessesForUser1()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnItemOwnerAttributeAccessesForGroup1()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnItemOwnerAttributeAccessesForUser2()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnUserOwnerAttributesAccessesForGroup1()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnUserOwnerAttributesAccessesForUser2()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnItemAttributesAccessesForGroup1()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnItemAttributesAccessesForUser2()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnUserAttributesAccessesForGroup1()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnUserAttributesAccessesForUser2()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnItemWildcardAttributesAccessesForGroup1()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnItemWildcardAttributesAccessesForUser2()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnItemOwnerAttributeAccessesForGroup2()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnItemOwnerAttributeAccessesForUser3()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnUserOwnerAttributeAccessesForGroup2()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnUserOwnerAttributeAccessesForUser3()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnItemAttributesAccessesForGroup2()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnItemAttributesAccessesForUser3()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnUserAttributesAccessesForGroup2()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnUserAttributesAccessesForUser3()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnItemWildcardAttributeAccessesForGroup2()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnItemWildcardAttributeAccessesForUser3()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnGlobalPermissionForSubgroup2()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnGlobalPermissionForUser5()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn403WhenUser1AccessGroup1Global()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn403WhenUser1AccessUser5Global()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn403WhenUser1AccessUser5Type()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn403WhenUser1AccessGroup1Type()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn403WhenUser1AccessUser5Attributes()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn403WhenUser1AccessGroupAttributes()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn200WhenUser5AccessSupergroupGlobal()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn200WhenUser5AccessGroup2Global()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn200WhenUser5AccessSubgroup2Global()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn200WhenUser5AccessSupergroupType()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn200WhenUser5AccessGroup2Type()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn200WhenUser5AccessSubgroup2Type()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn200WhenUser5AccessSupergroupAttributes()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn200WhenUser5AccessGroup2Attributes()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn200WhenEmployeemanager5AccessGroup2Attributes()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn200WhenUser5AccessSubgroup2()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldFailValidationForAttributes()
throws java.io.IOException,
javax.xml.bind.JAXBException
java.io.IOExceptionjavax.xml.bind.JAXBExceptionpublic void shouldReturnGlobalPermissionsIdOnlyWhenFieldsSetToBasic()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnGlobalPermissionsIdOnlyWhenFieldsSetToId()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnGlobalPermissionsAllFieldsWhenFieldsSetToFull()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnGlobalPermissions400WhenFieldsSetIncorrectly()
public void shouldReturnAttributesPermissionsIdOnlyWhenFieldsSetToBasic()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnAttributesPermissionsIdOnlyWhenFieldsSetToId()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnAttributesPermissionsAllFieldsWhenFieldsSetToFull()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnAttributesPermissions400WhenFieldsSetIncorrectly()
public void shouldReturnTypesPermissionsIdOnlyWhenFieldsSetToBasic()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnTypesPermissionsIdOnlyWhenFieldsSetToId()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnTypesPermissionsAllFieldsWhenFieldsSetToFull()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnTypesPermissions400WhenFieldsSetIncorrectly()
public void shouldReturn403WhenUser1AccessGroup1Catalogs()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn400WhenNoCatalogIsPassed()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturn400WhenNoVersionIsPassed()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnReadPermissionsFor1CatalogVersion()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnReadPermissionsFor2CatalogVersion()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnReadPermissionsFor2Catalogs()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionpublic void shouldReturnWritePermissionsFor1CatalogVersion()
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionprotected PermissionsListWsDTO retrieveAttributesPermissions(java.lang.String principal, java.lang.String user, java.lang.String attributes) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionprotected PermissionsListWsDTO retrieveAttributesPermissions(java.lang.String principal, java.lang.String user, java.lang.String attributes, java.lang.String fields) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionprotected Response retrieveAttributesPermissionsResponse(java.lang.String principal,
java.lang.String user,
java.lang.String attributes)
protected Response retrieveAttributesPermissionsResponse(java.lang.String principal,
java.lang.String user,
java.lang.String attributes,
java.lang.String fields)
protected PermissionsListWsDTO retrieveTypesPermissions(java.lang.String principal, java.lang.String user, java.lang.String types) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionprotected PermissionsListWsDTO retrieveTypesPermissions(java.lang.String principal, java.lang.String user, java.lang.String types, java.lang.String password) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionprotected 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
javax.xml.bind.JAXBExceptionprotected Response retrieveTypesPermissionsResponse(java.lang.String principal,
java.lang.String user,
java.lang.String types,
java.lang.String password)
protected Response retrieveTypesPermissionsResponse(java.lang.String principal,
java.lang.String user,
java.lang.String types,
java.lang.String password,
java.lang.String fields)
protected PermissionsWsDTO retrieveGlobalPermissions(java.lang.String principal, java.lang.String user) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionprotected PermissionsWsDTO retrieveGlobalPermissions(java.lang.String principal, java.lang.String user, java.lang.String fields) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionprotected Response retrieveGlobalPermissionsResponse(java.lang.String principal,
java.lang.String user)
protected Response retrieveGlobalPermissionsResponse(java.lang.String principal,
java.lang.String user,
java.lang.String fields)
protected CatalogPermissionsListWsDTO retrieveCatalogVersionPermissions(java.lang.String principal, java.lang.String user, java.lang.String catalogIds, java.lang.String catalogVersions) throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionprotected Response retrieveCatalogVersionPermissionsResponse(java.lang.String principal,
java.lang.String user,
java.lang.String catalogIds,
java.lang.String catalogVersions)
protected PermissionsWsDTO generateExpectedPermissionsWsDTO(java.lang.String id, java.util.Map<java.lang.String,java.lang.String> permissions)
protected CatalogPermissionsWsDTO generateExpectedCatalogPermissionsWsDTO(java.lang.String catalogId, java.lang.String catalogVersion, java.util.Map<java.lang.String,java.lang.String> permissions)
public static void assertEqualsPermissionsListWsDTO(PermissionsListWsDTO expected, PermissionsListWsDTO tested)
public static void assertEqualsPermissionsWsDTO(PermissionsWsDTO expected, PermissionsWsDTO tested)
public static void assertEqualsCatalogPermissionsListWsDTO(CatalogPermissionsListWsDTO expected, CatalogPermissionsListWsDTO tested)
public static boolean areCatalogPermissionsWsDTOEquals(CatalogPermissionsWsDTO expected, CatalogPermissionsWsDTO tested)
protected <C> C unmarshallResult(Response result,
java.lang.Class<C> c)
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionCopyright © 2018 SAP SE. All Rights Reserved.