Class FraudCheckIntegrationTest

All Implemented Interfaces:
JaloSessionHolder

@IntegrationTest public class FraudCheckIntegrationTest extends ServicelayerTest
Integration test which test flow of order-process process when fraudCheck node return FRAUD
  • Field Details

  • Constructor Details

    • FraudCheckIntegrationTest

      public FraudCheckIntegrationTest()
  • Method Details

    • beforeClass

      public static void beforeClass()
      Load bean definition from yacceleratorfulfilmentprocess-spring-test-fraudcheck.xml
    • afterClass

      public static void afterClass()
      revert changes made beforeClass()
    • registerEvents

      protected void registerEvents()
    • unregisterEvents

      protected void unregisterEvents()
    • revertOldConfigParameterValues

      protected void revertOldConfigParameterValues()
    • setFraudScoreLimit

      protected void setFraudScoreLimit(int newScoreLimit)
    • setFraudScoreTolerance

      protected void setFraudScoreTolerance(int newScoreTolerance)
    • setMinPeriodWaitingForCleanUpConfigParam

      protected void setMinPeriodWaitingForCleanUpConfigParam(int numberOfSeconds)
    • placeTestOrder

      protected void placeTestOrder() throws InvalidCartException, CalculationException
      Throws:
      InvalidCartException
      CalculationException
    • addReallyBudGuyAndSetAsCurrentUser

      protected void addReallyBudGuyAndSetAsCurrentUser()
    • addNormalUserAndSetAsCurrentUser

      protected void addNormalUserAndSetAsCurrentUser()
    • createCronJob

      protected void createCronJob()
    • before

      public void before() throws Exception
      Create core data, add default users, register events, create cron jobs
      Throws:
      Exception
    • setupSite

      protected void setupSite()
    • after

      public void after()
      unregister events registered in before(), and revert config parameter values which was changed during test
    • cleanOrder

      protected void cleanOrder()
    • csAgentMarkOrderAsNoFraudulentAndTriggerCleanUpEvent

      protected void csAgentMarkOrderAsNoFraudulentAndTriggerCleanUpEvent()
    • csAgentMarkOrderAsNoFraudulentAndTriggerCSAOrderVerifiedEvent

      protected void csAgentMarkOrderAsNoFraudulentAndTriggerCSAOrderVerifiedEvent()
    • csAgentMarkOrderAsFraudulentAndTriggerCSAOrderVerifiedEvent

      protected void csAgentMarkOrderAsFraudulentAndTriggerCSAOrderVerifiedEvent()
    • getAllPlaceOrderProcessWithCurrentActionWaitForCleanUp

      protected List<BusinessProcessModel> getAllPlaceOrderProcessWithCurrentActionWaitForCleanUp()
    • getAllPlaceOrderProcessWithCurrentActionWaitForManualOrderCheckCSA

      protected List<BusinessProcessModel> getAllPlaceOrderProcessWithCurrentActionWaitForManualOrderCheckCSA()
    • getAllPlaceOrderProcessWithSpecificActionName

      protected List<BusinessProcessModel> getAllPlaceOrderProcessWithSpecificActionName(String processCurrentAction)
    • submitOrderMock

      protected String submitOrderMock(OrderModel order)
    • testUsersOrderIsEvaluatedAsFraudButUserIntervene

      public void testUsersOrderIsEvaluatedAsFraudButUserIntervene() throws InvalidCartException, CalculationException
      Test scenario: fraudCheckNode return FRAUD, but customer intervene and csAgent mark order as no fraudulent
      Throws:
      CalculationException
      InvalidCartException
    • testUsersOrderIsEvaluatedAsFraudAndIsCleanedUp

      public void testUsersOrderIsEvaluatedAsFraudAndIsCleanedUp() throws InvalidCartException, CalculationException, InterruptedException
      Test scenario: fraudCheck node return FRAUD, and after specific period of time order should have status CANCELLED
      Throws:
      InvalidCartException
      CalculationException
      InterruptedException
    • testUsersOrderIsEvaluatedAsPotentialFraudButCsAgentDecideThatOrderIsCorrect

      public void testUsersOrderIsEvaluatedAsPotentialFraudButCsAgentDecideThatOrderIsCorrect() throws InvalidCartException, CalculationException, InterruptedException
      Test scenario: Users order is evaluated as a potential, but CS Agent decide that order is correct
      Throws:
      InvalidCartException
      CalculationException
      InterruptedException
    • testUsersOrderIsEvaluatedAsPotentialFraudAndCsAgentDecideThatOrderIsFraudulent

      public void testUsersOrderIsEvaluatedAsPotentialFraudAndCsAgentDecideThatOrderIsFraudulent() throws InvalidCartException, CalculationException
      Test scenario: TODO
      Throws:
      CalculationException
      InvalidCartException
    • waitToTheEndOfProcess

      protected void waitToTheEndOfProcess(String processCode)