Zone of Development

by Damiano Abballe

Category: Unit Test

Web API – Unit Tests

In this post, we will see how to implement Unit Tests for the Web API created in the post: Docker – Web API and Sql Server. First of all, we open Visual Studio and we add a xUnit Test Project called TestWebApiServices: Then, we add a file called UserControllerUnitTests, where we will define all objects […]

Read More

Swift – Unit Test

In this post, we will see how to create a Unit Test in Swift, in order to test a function called IsNumberEven used to check if a number in input is either even or odd. First of all, we create a Swift file called Core, where we will define the function IsNumberEven: [Core.swift] Obviously function […]

Read More

C# – Using In Memory Database Provider for Unit Test

In this post, we will see how to use In-Memory Database Provider for Unit Test. We start creating a Blank Solution called ProjectDemo and then, we add a Class Library (.NET Core) called Entities where we will define a class called Retailer: [Retailer.cs] Now, we add another Class Library (.NET Core) called Data where we […]

Read More