I was looking for some correct examples of when people did unit testing (specific scenarios of when unit testing was implemented)
The term Unit Testing seems to frequently be used incorrectly. I am following the definition of unit testing given by the following article:
How just about everyone gets unit testing wrong: "in a nutshell, unit testing is when a developer writes a test method that calls "real" code and lets him or her know when the actual results don't match the expected results."
Also: Unit Testing: "UNIT TESTING is a level of software testing where individual units/ components of a software are tested. A unit is the smallest testable part of any software. In procedural programming, a unit may be an individual program, function, procedure, etc. In object-oriented programming, the smallest unit is a method, which may belong to a base/ super class, abstract class or derived/ child class."
Please, I am just looking for a lot of examples of good Unit test scenarios so I can get an understanding of unit testing best practices. I know and understand that it is difficult to state hard rules for unit testing. However, when you get enough Correct examples of what a unit test is, you start to understand when to implement a unit test.
The guidelines in the link above are actually pretty good and solid, but would still like to just find some examples of real case unit testing because in other articles (and in the article above), you find cases of unit testing horrors and other articles, like the below, which state that unit testing for the most part is a waste of time:
Any guidance or correct examples (or pointing to sites with good example cases) would be greatly appreciated. I've been looking for about a few days now. Apologies for the long message.