Design: Splitwise Financial Logic Testing
Focus on the financial calculation logic within Splitwise, excluding UI and network layers
Functional Requirements
FR1: Ensure all calculations of debts and credits between users are accurate
FR2: Verify correct handling of different currencies and conversions
FR3: Validate splitting rules such as equal, percentage, or custom shares
FR4: Confirm correct updates on user balances after transactions
FR5: Detect and prevent rounding errors in financial computations
Non-Functional Requirements
NFR1: Tests must cover edge cases like zero amounts, negative balances
NFR2: Financial calculations should be precise to at least two decimal places
NFR3: Tests should run quickly to support continuous integration
NFR4: System must handle concurrent updates without data inconsistency