Attention: Confluence is not suitable for the storage of highly confidential data. Please ensure that any data classified as Highly Protected is stored using a more secure platform.
If you have any questions, please refer to the University's data classification guide or contact ict.askcyber@sydney.edu.au

Skip to end of banner
Go to start of banner

Transaction Unit Testing

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 10 Next »

Processes/Subflows


Create a Link to Third Party Pledge (Apex Trigger)

Background of issue:

  • Batch processing in Flows are causing multiple updates on triggering record and is causing issues in Apex CPU Limit

Unit testing:

  1. When a Transaction record is created or updated, when all conditions are met:

    1. Transaction > Originating Transaction is not null

    2. Transaction > Third Party Payoff is true

    3. Transaction > Originating Transaction has changed or,

    4. Transaction > Third Party Payoff has changed

  2. Related Originating Transaction record is updated with the following value:

    1. Related Originating Transaction > Third Party Pledge will be equal to the triggering Gift record


USYD Campaign member status update when new transaction created (subflow)

Background of issue:

  • Re-implemented as a subflow

  • Update Records elements can be merged into one

Unit testing:

  1. When a Transaction record is created, all of the following conditions must be met:

    1. Transaction > Campaign Appeal is not null

    2. Transaction > Related to Void is false

    3. Transaction > Write Off? is false

    4. Transaction has a related Account

  2. Related Account has a Primary Contact

    1. All Campaign Members related to the Primary Contact with Status not equal to ‘Donated’ will be updated:

      1. Start Date equals Transaction > Transaction Date

      2. Stop Date equals Transaction > Transaction Date

      3. Status equals 'Donated'

  3. Related Account has a Secondary Contact

    1. All Campaign Members related to the Secondary Contact with Status not equal to ‘Donated’ will be updated:

      1. Start Date equals Transaction > Transaction Date

      2. Stop Date equals Transaction > Transaction Date

      3. Status equals 'Donated'


USYD Update Reporting Section Flags (subflow)

Background of issue:

  • Re-implemented as a subflow

  • Added a field update as an Assignment element.

Unit testing:

  1. When a Transaction record is created or updated, the following fields are updated (as flags):

    1. Send Pledge Reminder

    2. Funds Raised Flag Static

    3. Funds Received Flag Static

    4. Special Category Flag


USYD Transaction Roll up to Gift Pledge fields (subflow)

Background of issue:

  • Re-implemented as a subflow from Process Builder

Unit testing:

  • Unit Testing can be done by manually creating a Transaction under an existing GIft as these fields cannot be manually configured on creating Batch.

  • Make sure fields are populated prior to the dependent fields below. Record type can be any but please refer to record type required below.

    • Transaction Type

    • Account

    • Acknowledgement

    • Amount

    • Method

    • Campaign Appeal

    • Designation

  1. When a Transaction record is created or updated with the following fields:

    1. Transactoin Record type = Soft Credit (Managed) OR Pledge Soft Credit (Managed)

  2. THEN,

    1. Related Gift record’s Usyd_Gift_Driver_Derivation__c will be TRUE

  1. When a Transaction record is created or updated with the following fields:

    1. Write Off? = TRUE

    2. Record type = Pledge

    3. Method = Pledge

    4. Balance LESS THAN 0

  2. THEN,

    1. Related Gift record’s Pledge WO Designation will be Constituent Facing Name of Related Designation of Transaction record

    2. Related Gift record’s Pledge WO Notation will be Pledge Write Off Notation of Transaction record

  1. When a Transaction record is created or updated with a related Campaign Appeal record:

  2. THEN,

    1. Related Gift record’s USYD Campaign Appeal will be equal to Transaction record’s Campaign Appeal

  • No labels