16. January 2023 By Yağız Erbay
Unit Testing in Swift
In computer programming, a “unit test” is a software testing method that initializes a small chunk of our project and verifies its behavior independently from other parts. Most common unit tests contain three phases. First, it initializes a small piece of code it wants to test; then, it activates the system under test; and finally, it observes the resulting behavior. If the observed behavior is consistent with the expectations, the unit test passes; otherwise, it fails, indicating that there is a problem somewhere in the system under test. These three unit test phases are also known as Arrange, Act, and Assert, or simply AAA.