forked from cassiuscai/postfix-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mockito.postfixTemplates
32 lines (30 loc) · 2.18 KB
/
mockito.postfixTemplates
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Mockito postfix templates
# create mock instance
.mock : mockito create a mock instance
java.lang.Class [org.mockito.Mockito] → org.mockito.Mockito.mock($expr$) [USE_STATIC_IMPORTS]
.mockWithName : mockito create a mock instance with name
java.lang.Class [org.mockito.Mockito] → org.mockito.Mockito.mock($expr$, $name$) [USE_STATIC_IMPORTS]
.mockWithAnswer : mockito create a mock instance with default answer
java.lang.Class [org.mockito.Mockito] → org.mockito.Mockito.mock($expr$, (org.mockito.stubbing.Answer<$answerType$>) invocation -> $answerBody$) [USE_STATIC_IMPORTS]
# create spy instance
.spy : mockito create a spy instance
java.lang.Object [org.mockito.Mockito] → org.mockito.Mockito.spy($expr$) [USE_STATIC_IMPORTS]
# mockito stubing operations
.when : mockito when
ANY [org.mockito.Mockito] → org.mockito.Mockito.when($expr$) [USE_STATIC_IMPORTS]
.verify : mockito verify
ANY [org.mockito.Mockito] → org.mockito.Mockito.verify($expr$) [USE_STATIC_IMPORTS]
.verifyWithMode : mockito verify
ANY [org.mockito.Mockito] → org.mockito.Mockito.verify($expr$,$mode$) [USE_STATIC_IMPORTS]
.reset : mockito reset
ANY [org.mockito.Mockito] → org.mockito.Mockito.reset($expr$) [USE_STATIC_IMPORTS]
.clearInvocations : mockito clear invocations
ANY [org.mockito.Mockito] → org.mockito.Mockito.clearInvocations($expr$) [USE_STATIC_IMPORTS]
.doThrow : mockito doThrow
ANY [org.mockito.Mockito] → org.mockito.Mockito.doThrow($throwable$).when($expr$).$END$ [USE_STATIC_IMPORTS]
.doNothing : mockito doNothing
ANY [org.mockito.Mockito] → org.mockito.Mockito.doNothing().when($expr$).$END$ [USE_STATIC_IMPORTS]
.doAnswer : mockito doAnswer
ANY [org.mockito.Mockito] → org.mockito.Mockito.doAnswer((org.mockito.stubbing.Answer<$answerType$>) invocation -> $answerBody$).when($expr$).$END$ [USE_STATIC_IMPORTS]
.doReturn : mockito doReturn
ANY [org.mockito.Mockito] → org.mockito.Mockito.doReturn($returnValue$).when($expr$).$END$ [USE_STATIC_IMPORTS]