Arrange-Act-Assert (AAA) ایک pattern ہے جو ٹیسٹس کو تین مراحل میں واضح طریقے سے منظم کرتا ہے: Arrange (سیٹ اپ)، Act (عمل کو انجام دینا)، Assert (نتیجہ کی تصدیق)۔ یہ ٹیسٹس کو قابل فہم، منظم، اور سمجھنے میں آسان بناتا ہے۔
تین مراحل
ARRANGE → set up the test: create objects, prepare inputs, configure mocks, set state
ACT → perform the ACTION being tested (call the function/method under test)
ASSERT → verify the OUTCOME: check the result/behavior matches what's expected
→ A clear three-part structure for every test.
