@IntegrationTest public class DefaultBundleCommerceCartServiceNestedIntegrationTest extends ServicelayerTest
DefaultBundleCommerceCartService. This test class inherits from
DefaultSubscriptionCommerceCartService in order to run the super class' test cases against the new
DefaultBundleCommerceCartService to guarantee compatibility| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
AUTOPICK_COMPONENT |
protected BundleCommerceCartService |
bundleCommerceCartService |
protected BundleTemplateService |
bundleTemplateService |
protected CartModel |
cart |
static java.lang.String |
PRODUCT_AUTO |
protected ProductService |
productService |
static java.lang.String |
SECOND_COMPONENT1 |
ExpectedException |
thrown |
protected UnitModel |
unitModel |
protected UserService |
userService |
importServicejaloSession| Constructor and Description |
|---|
DefaultBundleCommerceCartServiceNestedIntegrationTest() |
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNoneautowireProperties, getBeanName, prepareApplicationContextAndSessionestablishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSessionpublic static final java.lang.String PRODUCT_AUTO
public static final java.lang.String SECOND_COMPONENT1
public static final java.lang.String AUTOPICK_COMPONENT
public ExpectedException thrown
protected CartModel cart
protected UnitModel unitModel
protected UserService userService
protected BundleTemplateService bundleTemplateService
protected BundleCommerceCartService bundleCommerceCartService
protected ProductService productService
public DefaultBundleCommerceCartServiceNestedIntegrationTest()
public void setUp()
throws java.lang.Exception
java.lang.Exceptionpublic void shouldNotDeleteItemsWhichDontSatisfyMinCondition()
throws CommerceCartModificationException,
CalculationException
public void populateBundleBoxEntryForNotRemovableProducts()
throws CommerceCartModificationException,
CalculationException
public void shouldNotUpdateExistingBundles()
throws CommerceCartModificationException,
CalculationException
public void shouldUpdateRegularProduct()
throws CommerceCartModificationException,
CalculationException
public void testAddToCart2BundleProducts()
throws CommerceCartModificationException
public void testAddToCart2BundleProductsNoStock()
throws CommerceCartModificationException
public void testAddToCart2ProductsAutoPick()
throws CommerceCartModificationException
public void shouldReplaceBundleProductInCart()
throws CommerceCartModificationException
public void shouldRejectReplacementInUnknownBundle()
throws CommerceCartModificationException
public void shouldRejectReplacementInNegativeBundle()
throws CommerceCartModificationException
public void shouldRejectReplacementWithNullComponent()
throws CommerceCartModificationException
public void shouldRejectReplacementWithNullProduct()
throws CommerceCartModificationException
public void replacingWithAnotherComponentShouldSimplyAdd()
throws CommerceCartModificationException
public void replacementShouldAddToNewBundle()
throws CommerceCartModificationException
public void testGetTemplatesForMasterOrderAndBundleNo()
throws CommerceCartModificationException
public void testFirstInvalidComponentInCartShouldBeRegularComponent()
throws CommerceCartModificationException
public void testFirstInvalidComponentInCartShouldBePremiumComponent()
throws CommerceCartModificationException
public void testGetFirstInvalidComponentInCartShouldBeBull()
throws CommerceCartModificationException
public void shouldDenyRemovalOfAutopickEntry()
throws CommerceCartModificationException
public void shouldRemoveAutopickAlongWithOwner()
throws CommerceCartModificationException
public void autopickProductCanNotBeAddedExplicitly()
throws CommerceCartModificationException
public void autopickProductIsAddedAutomatically()
throws CommerceCartModificationException
public void autopickProductShouldBeAddedToEveryBundle()
throws CommerceCartModificationException
public void autopickProductShouldBeAddedOnlyOnce()
throws CommerceCartModificationException
public void shouldDenyRemovalOfAutoPicked()
throws CommerceCartModificationException
public void autopickCanBeRemovedWithTheBundle()
throws CommerceCartModificationException
protected java.util.List<CommerceCartModification> addToCart(java.lang.String productCode, java.lang.String componentId, int bundleNo) throws CommerceCartModificationException
protected void addToCart(java.lang.String productCode)
throws CommerceCartModificationException
protected ProductModel getProduct(java.lang.String code)
protected BundleTemplateModel getBundleTemplate(java.lang.String templateId)
protected CatalogVersionModel getCatalog()
Copyright © 2018 SAP SE. All Rights Reserved.