“Arrange-Act-Assert” a pattern for arranging code in UnitTest
Each method should group code into these functional sections, separated by blank lines: Arrange all necessary preconditions and inputs.Act on the object or method under test.Assert that the expected results have occurred. Examples Benefits Clearly separates what is being tested from the setup and verification steps. Clarifies and focuses attention on a historically successful and generally necessary set of test steps. Makes some Test-Smells more obvious Assertions intermixed with “Act” …
“Arrange-Act-Assert” a pattern for arranging code in UnitTest Read More »