Types of unit test cases
Following are the three test cases :
- Positive Test cases
- Negative Test cases
- Exception Test cases
Positive Test cases is the first form of testing that a tester would perform on an application. If a test scenario doesn't need data, then the positive testing would require running the test exactly the manner in which it is supposed to run and hence it ensures that the application is meeting the specifications. The main purpose of Negative Test cases is to check if the errors are being shown to the user where its supposed to or handling a bad value more gracefully. It is the process of applying as much creativity as possible and validating the application against invalid data. So, Negative Test cases ensures the stability of the application. In Exception testing , it verify that code throws exceptions as expected.
Debug class and Trace class
The Systems.Diagnostics namespace includes Trace and Debug classes and both have very similar methods. The primary difference is that calls to the Debug class are typically only included in Debug build and Trace are included in Debug build and Release build. More about... Debug class and Trace class
- Does C# support multiple Inheritance ?
- What is Process ID ?
- How do I make a DLL in C# ?
- How many ways you can pass values to Windows Services ?
- Can we use "continue" statement in finally block ?
- What is nullable type in c# ?
- Difference between the Debug class and Trace class ?
- What is lock statement in C#
- What are dynamic type variables in C#
- What is the difference between is and as operator in C#?
- What are circular references in C#?
- What are the differences between events and delegates in C#
- How many types of comments are there in C#?
- What are the various ways to pass parameters to a method in C#?
- What are the different ways to deploy a assembly in net?
- What does assert() method do in c#
- What is literals in C# - Constants and Literals
- What is the use of goto statement in C#
- How can JIT code be faster than AOT compiled code
- Why events have no return types in .NET
- What's the difference between a static method and a non-static method in C#
- What's a weak reference c#?
- What is C# equivalent of the vb.net isNothing function
- What are indexers in C#
- What are generics in c#