Skip to content

MaximeLefrancois/intellij-templates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

#IntelliJ 13 code templates

##How to install the template

mvn clean package
  • Then, launch Intellij.
  • File > Import Settings...
  • Load the file settings.jar of the target project

##For to use this template

Ctrl+J them type "that" to get assertThat method from fest-assert (with static import,...)

or for surround templates : select a block of code then : Ctrl + Alt + J and type TRY to surround your code with a try {} catch {}

##IntelliJ templates folder:

On Windows

  • file://~/.IntelliJIdea13/config/templates

##References

##Code templates

template description
doThrowmockito / doThrow ... when
whenmockito when / thenReturn
doReturnmockito / doReturn...when
gwBDD Stub mock with given(…).willReturn(…) style
wgBDD Stub spy/mock with willReturn(…).given(…) style
amCreates a field with the @Mock annotation
asCreates a field with the @Spy annotation
aimCreates a field with the @InjectMocks annotation
rwmAdd @RunWith(MockitoJUnitRunner.class)
verifInserts a verify(…) statement
ioverifInserts Mockito.inOrder(mocks) followed by inOrder.verify(…) statementInserts Mockito.inOrder(mocks) followed by inOrder.verify(…) statement
template description
thatthat / assert4j
equaltoFest Assertion assertThat / is equal to
template description
should_NGcreate a test NG unit test
template description
shouldcreate a junit test
run_theoriesRun With Theories
should_theorycreate theory unit test

Plain java (surround)

template description
TRYSurround with Try/Catch

About

This project allows to generate intellij templates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published