Class ProductConfigurationAccessIntegrationTest
- java.lang.Object
-
- de.hybris.platform.testframework.HybrisJUnit4Test
-
- de.hybris.platform.servicelayer.ServicelayerBaseTest
-
- de.hybris.platform.servicelayer.ServicelayerTest
-
- de.hybris.platform.sap.productconfig.services.integrationtests.CPQServiceLayerTest
-
- de.hybris.platform.sap.productconfig.facades.integrationtests.CPQFacadeLayerTest
-
- de.hybris.platform.sap.productconfig.facades.integrationtests.ProductConfigurationAccessIntegrationTest
-
- All Implemented Interfaces:
JaloSessionHolder
@IntegrationTest public class ProductConfigurationAccessIntegrationTest extends CPQFacadeLayerTest
This test checks the negative cases, when accessing a product configuration shall fail. The positive cases are already tests by all other integration tests.
-
-
Field Summary
Fields Modifier and Type Field Description protected DefaultQuoteFacade
defaultQuoteFacade
protected boolean
isPersistentLifecycle
protected OrderFacade
orderfacde
protected SessionAccessService
sessionAccess
org.junit.rules.ExpectedException
thrown
-
Fields inherited from class de.hybris.platform.sap.productconfig.facades.integrationtests.CPQFacadeLayerTest
cartFacade, checkoutFacade, commerceCartFactory, configOrderIntegrationFacade, configQuoteIntegrationFacade, cpqAbstractOrderEntryLinkStrategy, cpqCartFacade, cpqFacade, cpqSavedCartFacade, cpqSessionAccessFacade, customerFacade, facadeConfigValueHelper, KB_KEY_CONF_PIPE, KB_KEY_CPQ_HOME_THEATER, KB_KEY_CPQ_LAPTOP, KB_KEY_CPQ_LAPTOP_MUSIC, KB_KEY_CPQ_LAPTOP_MUZAC, KB_KEY_KD990SOL, KB_KEY_MIXER, KB_KEY_NUMERIC_PRODUCT, KB_KEY_WEC_DRAGON_BUS, KB_KEY_Y_SAP_SIMPLE_POC, KB_VERSION, LOGICAL_SYSTEM, PASSWORD, productConfigurationPersistenceService, saveCartFacade, SOLD_TO_NAME, USER_NAME, USER_NAME2
-
Fields inherited from class de.hybris.platform.sap.productconfig.services.integrationtests.CPQServiceLayerTest
authenticationService, baseSiteService, baseStoreService, cartService, catalogVersionService, commerceCartService, configurationLifecycleStrategy, configurationProductUtil, cpqService, cpqServiceNoRules, customerModel, flexibleSearchService, i18NService, KB_CPQ_HOME_THEATER, KB_CPQ_LAPTOP, KB_CPQ_LAPTOP_MUSIC, KB_Y_SAP_SIMPLE_POC, modelService, PRODUCT_CODE_CONF_PIPE, PRODUCT_CODE_CPQ_HOME_THEATER, PRODUCT_CODE_CPQ_LAPTOP, PRODUCT_CODE_CPQ_LAPTOP_MUSIC, PRODUCT_CODE_CPQ_LAPTOP_MUZAC, PRODUCT_CODE_YSAP_NOCFG, PRODUCT_CODE_YSAP_SIMPLE_POC, productConfigurationCacheAccessService, productService, providerFactory, realUserService, serviceConfigValueHelper, TEST_CONFIGURE_SITE
-
Fields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importService
-
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession
-
-
Constructor Summary
Constructors Constructor Description ProductConfigurationAccessIntegrationTest()
-
Method Summary
-
Methods inherited from class de.hybris.platform.sap.productconfig.facades.integrationtests.CPQFacadeLayerTest
prepareCPQData, validateCartAndPlaceOrder, validateCartAndPlaceOrder
-
Methods inherited from class de.hybris.platform.sap.productconfig.services.integrationtests.CPQServiceLayerTest
clearProductConfigurationItems, createCoreData, ensureCPSProvider, ensureMockProvider, ensureNoRulesCPSWithDefaultLifecyclce, ensureSSCProvider, getFromPersistence, getLifecycleBeanName, importCPQUserData, importCsvIfExist, initProviders, isDefaultLifecycle, isPersistentLifecycle, makeProductCatalogVersionAvailableInSession, selectStrategyTestChecker, tearDown, useCurrency_USD, useLocale_EN
-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNone
-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSession
-
Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
-
-
-
Field Detail
-
sessionAccess
protected SessionAccessService sessionAccess
-
orderfacde
protected OrderFacade orderfacde
-
defaultQuoteFacade
protected DefaultQuoteFacade defaultQuoteFacade
-
thrown
public org.junit.rules.ExpectedException thrown
-
isPersistentLifecycle
protected boolean isPersistentLifecycle
-
-
Method Detail
-
setUp
public void setUp() throws java.lang.Exception
- Throws:
java.lang.Exception
-
importCPQTestData
public void importCPQTestData() throws ImpExException, java.lang.Exception
- Overrides:
importCPQTestData
in classCPQServiceLayerTest
- Throws:
ImpExException
java.lang.Exception
-
testReadingNotOwnProductRelatedFailsNot
public void testReadingNotOwnProductRelatedFailsNot() throws InvalidCredentialsException
Configurations with product relation
read: allow for every user
update: allow only for same user- Throws:
InvalidCredentialsException
-
testUpdatingNotOwnProductRelatedFails
public void testUpdatingNotOwnProductRelatedFails() throws InvalidCredentialsException
- Throws:
InvalidCredentialsException
-
testReleasingNotOwnProductRelatedFails
public void testReleasingNotOwnProductRelatedFails() throws InvalidCredentialsException
- Throws:
InvalidCredentialsException
-
testReadingNotOwnCartRelatedFails
public void testReadingNotOwnCartRelatedFails() throws InvalidCredentialsException, CommerceCartModificationException
Configurations with cart relation
read: allow only for same user
update: allow only for drafts and for same user
-
testUpdatingNotOwnCartRelatedFails
public void testUpdatingNotOwnCartRelatedFails() throws InvalidCredentialsException, CommerceCartModificationException
-
createAndAddToCartConfig
protected ConfigurationData createAndAddToCartConfig() throws CommerceCartModificationException
-
testReleasingNotOwnCartRelatedFails
public void testReleasingNotOwnCartRelatedFails() throws InvalidCredentialsException, CommerceCartModificationException
-
testUpdatingOwnCartRelatedNoDraftFails
public void testUpdatingOwnCartRelatedNoDraftFails() throws InvalidCredentialsException, CommerceCartModificationException
-
testReadingNotOwnDraftCartRelatedFails
public void testReadingNotOwnDraftCartRelatedFails() throws InvalidCredentialsException, CommerceCartModificationException
-
testUpdatingNotOwnDraftCartRelatedFails
public void testUpdatingNotOwnDraftCartRelatedFails() throws InvalidCredentialsException, CommerceCartModificationException
-
prepareCartDraft
protected ConfigurationData prepareCartDraft() throws CommerceCartModificationException
-
testReleasingNotOwnDraftCartRelatedFails
public void testReleasingNotOwnDraftCartRelatedFails() throws InvalidCredentialsException, CommerceCartModificationException
-
testReadingNotOwnOrderRelatedFails
public void testReadingNotOwnOrderRelatedFails() throws InvalidCredentialsException, CommerceCartModificationException, InvalidCartException
Configurations with order relation
read: allow only for same user
update: never allowed
-
testUpdatingOwnOrderRelatedFails
public void testUpdatingOwnOrderRelatedFails() throws InvalidCredentialsException, CommerceCartModificationException, InvalidCartException
-
testReleasingNotOwnOrderRelatedFails
public void testReleasingNotOwnOrderRelatedFails() throws InvalidCredentialsException, CommerceCartModificationException, InvalidCartException
-
prepareOrder
protected ConfigurationData prepareOrder() throws CommerceCartModificationException, InvalidCartException
-
testReadingNotOwnQuoteRelatedFails
public void testReadingNotOwnQuoteRelatedFails() throws InvalidCredentialsException, CommerceCartModificationException, InvalidCartException
Configurations with quote relation
read: allow only for same user
update: never allowed
-
testUpdatingOwnQuoteRelatedFails
public void testUpdatingOwnQuoteRelatedFails() throws InvalidCredentialsException, CommerceCartModificationException, InvalidCartException
-
testReleasingNotOwnQuoteRelatedFails
public void testReleasingNotOwnQuoteRelatedFails() throws InvalidCredentialsException, CommerceCartModificationException, InvalidCartException
-
prepareQuote
protected ConfigurationData prepareQuote() throws CommerceCartModificationException
-
testInconsistentStateIsResolved
public void testInconsistentStateIsResolved() throws CommerceCartModificationException
-
login
public void login(java.lang.String userName, java.lang.String password) throws InvalidCredentialsException
- Overrides:
login
in classCPQFacadeLayerTest
- Throws:
InvalidCredentialsException
-
logout
public void logout()
- Overrides:
logout
in classCPQFacadeLayerTest
-
-