Class DefaultCouponCodeGenerationServiceUnitTest
java.lang.Object
de.hybris.platform.couponservices.services.impl.DefaultCouponCodeGenerationServiceUnitTest
Unit tests for coupon code generation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgenerateCouponLengthAndDelimitersYxZ(int parts, int lengths, String separator) voidsetUp()voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidprotected Stringtext(int length, char character)
-
Constructor Details
-
DefaultCouponCodeGenerationServiceUnitTest
public DefaultCouponCodeGenerationServiceUnitTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
testCreateAlphabet
public void testCreateAlphabet() -
testCreateAlphabetWhenCodeSeparatorIsPartOfAlphabet
public void testCreateAlphabetWhenCodeSeparatorIsPartOfAlphabet() -
testIsValidCodeSeparatorNull
public void testIsValidCodeSeparatorNull() -
testIsValidCodeSeparatorLengthMoreThen1
public void testIsValidCodeSeparatorLengthMoreThen1() -
testIsValidCodeSeparatorWrongChar
public void testIsValidCodeSeparatorWrongChar() -
testIsValidCodeSeparatorOk
public void testIsValidCodeSeparatorOk() -
testWrongLengths
- Throws:
CouponCodeGenerationException
-
testExtractCouponPrefix
- Throws:
CouponCodeGenerationException
-
testPrefixGeneration
- Throws:
CouponCodeGenerationException
-
generateCouponLengthAndDelimitersYxZ
protected String generateCouponLengthAndDelimitersYxZ(int parts, int lengths, String separator) throws CouponCodeGenerationException - Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters1x4
public void testGenerateAndVerifyCouponLengthAndDelimiters1x4() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters4x1
public void testGenerateAndVerifyCouponLengthAndDelimiters4x1() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters1x8
public void testGenerateAndVerifyCouponLengthAndDelimiters1x8() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters2x4
public void testGenerateAndVerifyCouponLengthAndDelimiters2x4() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters4x2
public void testGenerateAndVerifyCouponLengthAndDelimiters4x2() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters8x1
public void testGenerateAndVerifyCouponLengthAndDelimiters8x1() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters1x12
public void testGenerateAndVerifyCouponLengthAndDelimiters1x12() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters2x6
public void testGenerateAndVerifyCouponLengthAndDelimiters2x6() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters3x4
public void testGenerateAndVerifyCouponLengthAndDelimiters3x4() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters4x3
public void testGenerateAndVerifyCouponLengthAndDelimiters4x3() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters6x2
public void testGenerateAndVerifyCouponLengthAndDelimiters6x2() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters12x1
public void testGenerateAndVerifyCouponLengthAndDelimiters12x1() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters1x16
public void testGenerateAndVerifyCouponLengthAndDelimiters1x16() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters2x8
public void testGenerateAndVerifyCouponLengthAndDelimiters2x8() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters4x4
public void testGenerateAndVerifyCouponLengthAndDelimiters4x4() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters8x2
public void testGenerateAndVerifyCouponLengthAndDelimiters8x2() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters16x1
public void testGenerateAndVerifyCouponLengthAndDelimiters16x1() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters1x20
public void testGenerateAndVerifyCouponLengthAndDelimiters1x20() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters2x10
public void testGenerateAndVerifyCouponLengthAndDelimiters2x10() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters4x5
public void testGenerateAndVerifyCouponLengthAndDelimiters4x5() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters5x4
public void testGenerateAndVerifyCouponLengthAndDelimiters5x4() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters10x2
public void testGenerateAndVerifyCouponLengthAndDelimiters10x2() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters20x1
public void testGenerateAndVerifyCouponLengthAndDelimiters20x1() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters1x24
public void testGenerateAndVerifyCouponLengthAndDelimiters1x24() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters2x12
public void testGenerateAndVerifyCouponLengthAndDelimiters2x12() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters3x8
public void testGenerateAndVerifyCouponLengthAndDelimiters3x8() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters4x6
public void testGenerateAndVerifyCouponLengthAndDelimiters4x6() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters6x4
public void testGenerateAndVerifyCouponLengthAndDelimiters6x4() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters8x3
public void testGenerateAndVerifyCouponLengthAndDelimiters8x3() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters12x2
public void testGenerateAndVerifyCouponLengthAndDelimiters12x2() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters24x1
public void testGenerateAndVerifyCouponLengthAndDelimiters24x1() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters1x28
public void testGenerateAndVerifyCouponLengthAndDelimiters1x28() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters2x14
public void testGenerateAndVerifyCouponLengthAndDelimiters2x14() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters4x7
public void testGenerateAndVerifyCouponLengthAndDelimiters4x7() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters7x4
public void testGenerateAndVerifyCouponLengthAndDelimiters7x4() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters14x2
public void testGenerateAndVerifyCouponLengthAndDelimiters14x2() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters28x1
public void testGenerateAndVerifyCouponLengthAndDelimiters28x1() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters1x32
public void testGenerateAndVerifyCouponLengthAndDelimiters1x32() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters2x16
public void testGenerateAndVerifyCouponLengthAndDelimiters2x16() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters4x8
public void testGenerateAndVerifyCouponLengthAndDelimiters4x8() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters8x4
public void testGenerateAndVerifyCouponLengthAndDelimiters8x4() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters16x2
public void testGenerateAndVerifyCouponLengthAndDelimiters16x2() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters32x1
public void testGenerateAndVerifyCouponLengthAndDelimiters32x1() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters1x36
public void testGenerateAndVerifyCouponLengthAndDelimiters1x36() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters2x18
public void testGenerateAndVerifyCouponLengthAndDelimiters2x18() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters3x12
public void testGenerateAndVerifyCouponLengthAndDelimiters3x12() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters4x9
public void testGenerateAndVerifyCouponLengthAndDelimiters4x9() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters6x6
public void testGenerateAndVerifyCouponLengthAndDelimiters6x6() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters9x4
public void testGenerateAndVerifyCouponLengthAndDelimiters9x4() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters12x3
public void testGenerateAndVerifyCouponLengthAndDelimiters12x3() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters18x2
public void testGenerateAndVerifyCouponLengthAndDelimiters18x2() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters36x1
public void testGenerateAndVerifyCouponLengthAndDelimiters36x1() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters1x40
public void testGenerateAndVerifyCouponLengthAndDelimiters1x40() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters2x20
public void testGenerateAndVerifyCouponLengthAndDelimiters2x20() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters4x10
public void testGenerateAndVerifyCouponLengthAndDelimiters4x10() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters5x8
public void testGenerateAndVerifyCouponLengthAndDelimiters5x8() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters8x5
public void testGenerateAndVerifyCouponLengthAndDelimiters8x5() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters10x4
public void testGenerateAndVerifyCouponLengthAndDelimiters10x4() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters20x2
public void testGenerateAndVerifyCouponLengthAndDelimiters20x2() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateAndVerifyCouponLengthAndDelimiters40x1
public void testGenerateAndVerifyCouponLengthAndDelimiters40x1() throws CouponCodeGenerationException- Throws:
CouponCodeGenerationException
-
testGenerateCouponCodes
- Throws:
CouponCodeGenerationException
-
text
-