What is Unit Testing?
It is a method by which individual units of source code are tested to check their fitness for purpose.
Refactoring means that you change and (hopefully) improve the internal structure of the code without changing the behaviour of the code. For example, developers may change a piece of code in order to make the code run faster but still perform the same task. Why is unit testing important for refactoring?
It is important because it allows the programmer to refactor code at a later date, and make sure the module still works correctly (e.g., in regression testing). The procedure is to write test cases for all functions and methods so that whenever a change causes a fault, it can be quickly identified and fixed.
How does Unit Testing help the bottom-up testing approach?
Because by testing the parts of a program first and then testing the sum of its parts, integration testing becomes much easier.