Unit testing refers to the process of testing each piece of code in isolation. Typically, unit tests are written for application code, such as for web applications, middleware services, and desktop applications. With cloud deployments gaining popularity, it is needed to test the resources provisioned using ARM templates, to validate their configurations.
The process of unit testing is quite simple. Let's understand this process using an example: So, let's assume we want to unit test a function that simply adds together two numbers. The function has a single line of code that adds two numbers that are supplied as parameters to the function. Such a unit testing scenario's function would be like the following:
- Using two positive numbers and the resulting actual added value should match the expected value, and it should be a positive number greater than...