Package de.hybris.platform.cockpit
Class CockpitCollectionServiceTest
java.lang.Object
de.hybris.platform.testframework.HybrisJUnit4Test
de.hybris.platform.servicelayer.ServicelayerBaseTest
de.hybris.platform.servicelayer.ServicelayerTest
de.hybris.platform.servicelayer.ServicelayerTransactionalTest
de.hybris.platform.cockpit.CockpitCollectionServiceTest
- All Implemented Interfaces:
JaloSessionHolder
Demonstrates usage of the CockpitCollectionService
-
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 TypeMethodDescriptionvoidDemonstrates how to get elements from a Cockpit special collectionvoidsetUp()prepares some test data, before execution of every test:
- the test principalModel will be created and savedvoidDemonstrates how to add another item to the Cockpit collection
- Retrieve the "testA" collection
- Add a new ProductModel "testProduct4" to this collection
- Verify the ProductModel was successfully addedvoidDemonstrates how to create a deep copy of a cockpit collectionvoidDemonstrates various ways to retrieve cockpit collections:
- Retrieves Cockpit collections for a given user
- Retrieves Cockpit special collections for a given user
- Retrieves Cockpit special collections for a given user and collection typevoidDemonstrates how to check read access for a given cockpit collection.
The impex file testCollections.csv contains the test data permissions.voidDemonstrates how to check write access for a given cockpit collection.
The impex file testCollections.csv contains the test data permissions.voidDemonstrates how to remove an element from the cockpit collection:
- Retrieve the "testA" collection
- Attempt to remove a non-existent element in the collection
- Attempt to remove an existing element in the collectionMethods 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
-
CockpitCollectionServiceTest
public CockpitCollectionServiceTest()
-
-
Method Details
-
setUp
prepares some test data, before execution of every test:
- the test principalModel will be created and saved- Throws:
Exception
-
testCloneCollection
public void testCloneCollection()Demonstrates how to create a deep copy of a cockpit collection -
testHasReadCollectionRight
public void testHasReadCollectionRight()Demonstrates how to check read access for a given cockpit collection.
The impex file testCollections.csv contains the test data permissions. -
testHasWriteCollectionRight
public void testHasWriteCollectionRight()Demonstrates how to check write access for a given cockpit collection.
The impex file testCollections.csv contains the test data permissions. -
testGetCollections
public void testGetCollections()Demonstrates various ways to retrieve cockpit collections:
- Retrieves Cockpit collections for a given user
- Retrieves Cockpit special collections for a given user
- Retrieves Cockpit special collections for a given user and collection type -
getElements
public void getElements()Demonstrates how to get elements from a Cockpit special collection -
testAddToCollection
public void testAddToCollection()Demonstrates how to add another item to the Cockpit collection
- Retrieve the "testA" collection
- Add a new ProductModel "testProduct4" to this collection
- Verify the ProductModel was successfully added -
testRemoveFromCollection
public void testRemoveFromCollection()Demonstrates how to remove an element from the cockpit collection:
- Retrieve the "testA" collection
- Attempt to remove a non-existent element in the collection
- Attempt to remove an existing element in the collection
-