As developers, we always write code targeted to achieve a certain feature/functionality. The piece of code is written down with best efforts to be bug free and to work exactly as expected. Unfortunately we human beings are prone to make errors & mistakes, as a result bugs do creep in. Hence it is always advisable to test out individual units of code, in order to be sure enough that your implementation actually works. With this we are introduced to the term “Unit Testing”. We can define unit testing in this manner:
It is the methodology of testing out individual units of behaviour. An individual unit of behaviour is the smallest possible unit of behaviour that can be individually tested in isolation.
The Conditional attribute which is an alias for ConditionalAttribute present in System.Diagnostics, makes the execution of a method dependent on a preprocessing identifier. It can be applied to a method or an attribute class. It tells the compiler to include the method or attribute, based on whether the identifier is defined or not. We can use the following methods to define the identifier :
SQL Server 2008 introduced a powerful and an efficient way to track the DML changes, know as Change Tracking(CT) and Change Data Capture (CDC). Both of them seem to be synonyms but they do have differences, making them useful in different scenarios. Lets try to understand what CT and CDC are.