Part 2: What exactly is a Unit Test?
Over the past ten to twenty years of software development, programmers worldwide have mostly recognised that the best way to design software is by using “Objects”. Java is an excellent example of this and its popularity speaks for itself.
Whether you call them “objects” or “packages”, they are all basically program “units” and are simply an encapsulation of some code which has attributes and methods (or procedures in Oracle terms).
So now that our code is neatly packaged up in our “unit” it becomes easy to test it.
A unit test is basically a program unit that “partners” the main unit of code. (A bit like your wife asking you if you’ve cut the grass. You do the work and your wife checks that you’ve done it properly!)On to Part 3