Kiếm thử phần mềm
Unit-Test Patterns for .NET
Arrange-Act-Assert (AAA) Pattern
Writing Unit Tests for the .NET Framework with the Microsoft Unit Test Framework for Managed Code
The AAA (Arrange, Act, Assert) pattern is a common way of writing unit tests for a method under test.
The Arrange section of a unit test method initializes objects and sets the value of the data that is passed to the method under test.
The Act section invokes the method under test with the arranged parameters.
The Assert section verifies that the action of the method under test behaves as expected.