Lab 5: Unit Testing

As you may have noticed, there are many things that can go wrong when writing code. Unit testing is a method by which individual units of source code are tested to determine if they are fit for use. A unit is the smallest testable part of an application. In procedural programming, a unit may be an individual function or procedure. In object-oriented programming, a unit is usually an interface or a class. We can separate what needs to be tested for each class into different catagories in order to make testing an easier process.