Explain the three test cases in unit testing?



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

Post New Answer

More C Sharp Interview Questions

What is the difference between double and decimal in c#?

1 Answers  


How the versioning applies to Assemblies or can you explain version numbers?

1 Answers   CitiusTech,


What is written in c#?

1 Answers  


Is Facebook a desktop application?

1 Answers  


What is yield c#?

1 Answers  


What are primitive data types in c#?

1 Answers  


What is gac? How to put assembly in gac?

1 Answers  


What is multithreading? What are the problems that comes with multithreading and how to manage them?

1 Answers   MCN Solutions,


How do you create user defined data types in c#?

1 Answers  


Why do we need oops in c#?

1 Answers  


Can we have a non static member function in a base class to be override in derived with static modifier?

7 Answers   Wipro,


What is a data set in c#?

1 Answers  


Categories