Arrange-Act-Assert (AAA) ਟੈਸਟਾਂ ਨੂੰ ਤਿੰਨ ਪੜਾਵਾਂ ਵਿੱਚ ਸਪਸ਼ਟ ਢੰਗ ਨਾਲ ਸੰਗਠਿਤ ਕਰਨ ਲਈ ਇੱਕ ਪੈਟਰਨ ਹੈ: 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.
