Skip to content

Instantly share code, notes, and snippets.

@jreyes33
Last active August 25, 2016 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jreyes33/d5fb87ebea848d1a3e4b to your computer and use it in GitHub Desktop.
Save jreyes33/d5fb87ebea848d1a3e4b to your computer and use it in GitHub Desktop.
Live templates. Copy them in ~/Library/Preferences/IntelliJIdea14/templates for Ultimate or ~/Library/Preferences/IdeaIC14/templates for Community. In Linux: ~/.IdeaIC2016.2/config/templates
<templateSet group="custom">
<template name="ati" value="org.hamcrest.MatcherAssert.assertThat($ACTUAL$, org.hamcrest.CoreMatchers.is($EXPECTED$));" description="assertThat is" toReformat="true" toShortenFQNames="true" useStaticImport="true">
<variable name="ACTUAL" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="EXPECTED" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_CODE" value="false" />
<option name="JAVA_STATEMENT" value="true" />
<option name="JAVA_EXPRESSION" value="true" />
<option name="JAVA_DECLARATION" value="false" />
<option name="JAVA_COMMENT" value="false" />
<option name="JAVA_STRING" value="false" />
<option name="COMPLETION" value="false" />
</context>
</template>
<template name="wtr" value="org.mockito.Mockito.when($METHOD$).thenReturn($RETURN$);" description="when thenReturn" toReformat="true" toShortenFQNames="true" useStaticImport="true">
<variable name="METHOD" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="RETURN" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_CODE" value="false" />
<option name="JAVA_STATEMENT" value="true" />
<option name="JAVA_EXPRESSION" value="true" />
<option name="JAVA_DECLARATION" value="false" />
<option name="JAVA_COMMENT" value="false" />
<option name="JAVA_STRING" value="false" />
<option name="COMPLETION" value="false" />
</context>
</template>
<template name="are" value="org.unitils.reflectionassert.ReflectionAssert.assertReflectionEquals($EXPECTED$, $ACTUAL$);" description="assertReflectionEquals" toReformat="true" toShortenFQNames="true" useStaticImport="true">
<variable name="EXPECTED" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="ACTUAL" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_CODE" value="false" />
<option name="JAVA_STATEMENT" value="true" />
<option name="JAVA_EXPRESSION" value="true" />
<option name="JAVA_DECLARATION" value="false" />
<option name="JAVA_COMMENT" value="false" />
<option name="JAVA_STRING" value="false" />
<option name="COMPLETION" value="false" />
</context>
</template>
</templateSet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment