what is unit testing code example
Example 1: what is unit testing
UNIT TESTING is a software testing where individual
units or components of a software are tested.
The purpose is to validate that each unit of the
software performs as designed.
Example 2: Unit Testing
It is part of the white box testing.
It’s done by the developers before
they deploy the code from Development
environment to QA environment.
• Since it is performed by developers,
I have never done unit testing yet.
But I think I can learn it and do it if it is needed
Example 3: what is component testing
Testing each component of the application
separately. In application it could be
one component. One component has
stand-alone functionality.
Ex. in amazon.com Seller functionality
can be one component. Buyer can be another
component. Also, Amazon prime videos
can be another component.
Example 4: what is a unit testable code
public class SomeClass
{
public SomeClass(calculatedParams)
{
...
}
}
public interface ISomeClassCreator
{
SomeClass Create(params);
}
public class SomeClassCreator: ISomeClassCreator
{
public SomeClass Create(params)
{
...
}
}