what do you test in 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: 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)
{
...
}
}