Please enable JavaScript.
Coggle requires JavaScript to display documents.
Mockito Tutorial (Good Unit Tests Basics (Readable, Fails only when there…
Mockito Tutorial
Good Unit Tests Basics
Readable
Fails only when there are real logic failures
BDD style
Given When Then
BDD Mockito Syntax
test function returns void
verify calls on mock
Hamcrest Matchers
more readerable
JUnit Rules
Using MockitoJUnit.rule() instead of
RunWith(MockitoJUnitRunner.class)
Why does Mockito not allow stubbing final and private methods
promote good architecture
PowerMock
used for bad designed legacy code
static method
private method
constructor
disadvantages of stubs
capture argument passed to a mock
Mockito Annotation
with Spring
Spy