Class OldSysCustomerMgrMock

java.lang.Object
de.calamanari.pk.wrapper.legacy.OldSysCustomerMgr
de.calamanari.pk.wrapper.OldSysCustomerMgrMock

public class OldSysCustomerMgrMock
extends OldSysCustomerMgr
OldSys Customer Manager Mock - mocks the old system's customer manager.
Author:
Karl Eilebrecht
  • Field Summary

    Fields inherited from class de.calamanari.pk.wrapper.legacy.OldSysCustomerMgr

    NO_RESULT
  • Constructor Summary

    Constructors
    Constructor Description
    OldSysCustomerMgrMock()
    New mock
  • Method Summary

    Modifier and Type Method Description
    void addTestRecord​(int customerId, java.lang.String[] customerData)
    Method allows to add test data.
    int[] findCustomerByExample​(java.lang.String[] searchData)
    Returns an array of the customerIds matching the search data:
    key value
    java.lang.String[] getCustomerData​(int customerId)
    Returns an array with customer record:
    key value

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • addTestRecord

      public void addTestRecord​(int customerId, java.lang.String[] customerData)
      Method allows to add test data.
      Parameters:
      customerId - id of customer
      customerData - data about customer
    • getCustomerData

      public java.lang.String[] getCustomerData​(int customerId)
      Description copied from class: OldSysCustomerMgr
      Returns an array with customer record:
      • key
      • value
      Overrides:
      getCustomerData in class OldSysCustomerMgr
      Parameters:
      customerId - identifier
      Returns:
      array with customer data or OldSysCustomerMgr.NO_RESULT if not found
    • findCustomerByExample

      public int[] findCustomerByExample​(java.lang.String[] searchData)
      Description copied from class: OldSysCustomerMgr
      Returns an array of the customerIds matching the search data:
      • key
      • value
      Overrides:
      findCustomerByExample in class OldSysCustomerMgr
      Parameters:
      searchData - array with customer data to search for
      Returns:
      array of customerIds or empty array NEVER NULL