Package de.hybris.platform.order
Class CartServiceTest
- java.lang.Object
-
- All Implemented Interfaces:
JaloSessionHolder
@IntegrationTest public class CartServiceTest extends ServicelayerTransactionalTest
-
-
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 CartServiceTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setUp()
void
testAddToCart()
void
testAppendToCart()
Tests appending cloned cart entries of source cart to the target cartvoid
testCartAfterChangeCurrency()
Test checks currency information in cart after currency change.void
testChangeCurrentCartUser()
void
testChangeQuantity()
void
testChangeSomeQuantitiesInCart()
void
testChangeSomeQuantitiesInCartOldStyle()
void
testCreateCartFromQuote()
void
testCustomCartTypeCartFactory()
void
testCustomCartTypeCartService()
void
testGetSessionCart()
void
testGetSessionCartInLocalView()
void
testGetSessionCartWhenJaloSessionUpdates()
void
testRefreshCartAfterChangeCurrency()
Test adds into cart one product and change currency of environment.void
testRemoveSessionCart()
void
testSetCartEntryQuantityToZero()
void
testSetSessionCart()
-
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
- Throws:
java.lang.Exception
-
testAddToCart
public void testAddToCart() throws InvalidCartException
- Throws:
InvalidCartException
-
testGetSessionCart
public void testGetSessionCart()
-
testGetSessionCartInLocalView
public void testGetSessionCartInLocalView()
-
testGetSessionCartWhenJaloSessionUpdates
public void testGetSessionCartWhenJaloSessionUpdates()
-
testRemoveSessionCart
public void testRemoveSessionCart()
-
testSetSessionCart
public void testSetSessionCart()
-
testChangeQuantity
public void testChangeQuantity() throws InvalidCartException
- Throws:
InvalidCartException
-
testSetCartEntryQuantityToZero
public void testSetCartEntryQuantityToZero() throws InvalidCartException
- Throws:
InvalidCartException
-
testChangeSomeQuantitiesInCartOldStyle
public void testChangeSomeQuantitiesInCartOldStyle() throws InvalidCartException
- Throws:
InvalidCartException
-
testChangeSomeQuantitiesInCart
public void testChangeSomeQuantitiesInCart() throws InvalidCartException, CalculationException
-
testCartAfterChangeCurrency
public void testCartAfterChangeCurrency() throws InvalidCartException
Test checks currency information in cart after currency change. When currency has been changed cart is recalculated.- Throws:
InvalidCartException
-
testRefreshCartAfterChangeCurrency
public void testRefreshCartAfterChangeCurrency() throws InvalidCartException
Test adds into cart one product and change currency of environment. Currency is changed to first currency available in system, different than currennt currency.
After currency change cart id loaded again and test checks if cart and cart items have correct currency settings.- Throws:
InvalidCartException
-
testAppendToCart
public void testAppendToCart()
Tests appending cloned cart entries of source cart to the target cart
-
testCustomCartTypeCartService
public void testCustomCartTypeCartService()
-
testCustomCartTypeCartFactory
public void testCustomCartTypeCartFactory()
-
testChangeCurrentCartUser
public void testChangeCurrentCartUser()
-
testCreateCartFromQuote
public void testCreateCartFromQuote()
-
-