Class OrderCodePatternTest
- java.lang.Object
-
- de.hybris.platform.testframework.HybrisJUnit4Test
-
- de.hybris.platform.servicelayer.ServicelayerBaseTest
-
- de.hybris.platform.order.strategies.OrderCodePatternTest
-
- All Implemented Interfaces:
JaloSessionHolder
@IntegrationTest public class OrderCodePatternTest extends ServicelayerBaseTest
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
KEYGEN_ORDER_CODE_DIGITS
static java.lang.String
KEYGEN_ORDER_CODE_TEMPLATE
static java.lang.String
KEYGEN_ORDER_CODE_TYPE
static java.lang.String
NUMERIC
-
Fields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession
-
-
Constructor Summary
Constructors Constructor Description OrderCodePatternTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
testOrderCode()
Retrieves the session cart with service layer, calls the placeOrder for the cart, and get the first order code.-
Methods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getApplicationContext, getBeanName, prepareApplicationContextAndSession
-
Methods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
-
-
-
Field Detail
-
NUMERIC
public static final java.lang.String NUMERIC
- See Also:
- Constant Field Values
-
KEYGEN_ORDER_CODE_TYPE
public static final java.lang.String KEYGEN_ORDER_CODE_TYPE
- See Also:
- Constant Field Values
-
KEYGEN_ORDER_CODE_DIGITS
public static final java.lang.String KEYGEN_ORDER_CODE_DIGITS
- See Also:
- Constant Field Values
-
KEYGEN_ORDER_CODE_TEMPLATE
public static final java.lang.String KEYGEN_ORDER_CODE_TEMPLATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
testOrderCode
public void testOrderCode() throws java.lang.Exception
Retrieves the session cart with service layer, calls the placeOrder for the cart, and get the first order code. Retrieves another cart within jalo session, converts it the model, also calls the placeOrder for it, and get the second order code. Compare the pattern of these two codes, and check they have the same length and pattern. For the pattern, the test is to check if they begin with the same code except the last two characters.- Throws:
java.lang.Exception
-
-