Skip to content

jbrasileiro/JUnitExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JUnitExample

JUnit Example

#GET STARTED

Starting unit testing

Structure

The UT has a basic structure:

1 - Preparation

2 - Execution

3 - Post-Execution

Structure with any mock framework

Simple Example

#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;

About

JUnit Example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published