JUnit Example
#GET STARTED
The UT has a basic structure:
1 - Preparation
2 - Execution
3 - Post-Execution
#1.Example Testability Issues Most often, a programmer struggling to write a test is facing off against one of a few common show-stoppers. They mostly fall under two categories:
-
Restricted access,
-
Inability to substitute certain parts of the implementation.
Here some solution to theses DESIGN PROBLEM, so it's means that:
THERE ARE EXCEPTION SOLUTION TO BAD DESIGN, WE MUST USE IT WHEN WE HAVE NO OPTION OF REFACTORING.
##1.1 Can't instantiate a class
##1.2 Can't observe the outcome ##1.3 Can't invoke a method ##1.4 Can't substitue a collabarator ##1.5 Can't override a method;