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
@DemoTest public class CockpitCollectionServiceTest extends ServicelayerTransactionalTest
Demonstrates usage of the CockpitCollectionService
-
-
Field Summary
-
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 CockpitCollectionServiceTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
getElements()
Demonstrates how to get elements from a Cockpit special collectionvoid
setUp()
prepares some test data, before execution of every test:
- the test principalModel will be created and savedvoid
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 addedvoid
testCloneCollection()
Demonstrates how to create a deep copy of a cockpit collectionvoid
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 typevoid
testHasReadCollectionRight()
Demonstrates how to check read access for a given cockpit collection.
The impex file testCollections.csv contains the test data permissions.void
testHasWriteCollectionRight()
Demonstrates how to check write access for a given cockpit collection.
The impex file testCollections.csv contains the test data permissions.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-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, 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
-
-
-
-
Method Detail
-
setUp
public void setUp() throws java.lang.Exception
prepares some test data, before execution of every test:
- the test principalModel will be created and saved- Throws:
java.lang.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
-
-