Please enable JavaScript.
Coggle requires JavaScript to display documents.
What is Unit Testing - Coggle Diagram
What is Unit Testing
-
Two Schools
Classical
books
Kent Beck: Test-Driven Development: By Example (Addison-Wesley
Professional, 2002)
Isolation Issue
It's not the code that needs to be tested in an isolated manner. Instead, unit test themselves should be run in isolation each other.
-
London Style
books
Growing ObjectOriented Software, Guided by Tests (Addison-Wesley Professional, 2009)
Isolation Issue
If the class has a dependency on another class, or serval classes, you need to replace all such dependencies with a test double
Definition
Test Double
A test double is an object that looks and behaves like its release intended counterpart but is actually a simplified version that reduces the
complexity and facilitates testing.
Types
Mock
A mock is a special kind of test double that allows you to examine interactions between the system under test and its collaborators
-
-
-
-