In this section, we are going to take a look at the other side of the testing pond and discover what Unit Tests are and why they are just as important as UI Tests. We'll start by creating a Unit Test project within our current Xcode project and create our first test.
Creating our first Unit Test project and tests
Creating a Unit Test project
As opposed to UI Tests, Unit Tests are designed to test specific pieces of logic within your app. For example, you may have a function that calculates a complex algorithm, which would then be used in multiple places within your app.
Writing a Unit Test for this function will give you the confidence of being able to update your logic without having to worry about any breaking changes...