To begin, you need to create your unit test project. To create the project, follow these steps:
Navigate to iOS | iPhone and create a new Empty Project solution.
Name this project
UnitTestsLibrary
.Change the name of the solution to
UnitTestsSolution
and click the OK button.Right-click the solution and add a new project.
From the new object dialog, open the iOS group.
Select the iOS Unit Tests Project template.
Name the project
UnitTests
and click the OK button.Right-click the
UnitTestsLibrary
project and add a new file.From the General group, add a new Empty Class to the project.
Name the file
MethodsForTesting
.From the same project, delete the
MyClass.cs
file.In the
UnitTests
project, right-click on the References folder and choose Edit References.In the Projects tab, check the
UnitTestsLibrary
project and click the OK button.From the
UnitTestLibrary
project, open theMethodsForTesting.cs
file and add the following code below the constructor:public int AddValues(int...