Component testing
As we explained in the previous section, units can be defined as a single function, a group of functions, or a whole component. Therefore, component testing is a special type of unit testing. In this section, we want to define a hypothetical component as part of example 22.1 and put the two functions found in the example into this component. Note that a component usually results in an executable or a library. We can suppose that our hypothetical component would result in a library that contains the two functions.
As we said before, we have to be able to test the functionality of a component. In this section, we still want to write test cases but the difference between the tests written in this section and the previous section is to do with the units that should be isolated. In the previous section, we had functions that should have been isolated, but in this section, we have a component, compromising of two functions working hand in hand, that needs to be isolated...