Explain the three test cases in unit testing?
Answer / Arun Kumar
Unit tests are designed to validate individual units of code, often methods or functions. In C#, there are typically three types of test cases:n
1. Positive Test Case:n - Tests the function when it returns a valid result for valid input.
2. Negative Test Case:n - Tests the function with invalid inputs to ensure that it handles errors gracefully and returns appropriate error messages or exceptions.
3. Edge Case Test Case:n - Tests the function at the boundaries of its expected range to verify if it behaves correctly when pushed to its limits.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between double and decimal in c#?
How the versioning applies to Assemblies or can you explain version numbers?
What is written in c#?
Is Facebook a desktop application?
What is yield c#?
What are primitive data types in c#?
What is gac? How to put assembly in gac?
What is multithreading? What are the problems that comes with multithreading and how to manage them?
How do you create user defined data types in c#?
Why do we need oops in c#?
Can we have a non static member function in a base class to be override in derived with static modifier?
What is a data set in c#?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)