Skip to content

Instantly share code, notes, and snippets.

@lee-dohm
Created July 6, 2015 23:33
Show Gist options
  • Save lee-dohm/661b274dcf65c0d6803b to your computer and use it in GitHub Desktop.
Save lee-dohm/661b274dcf65c0d6803b to your computer and use it in GitHub Desktop.
Java Snippets
'.source.java':
'private static final':
prefix: 'psf'
body: 'private static final'
'private static final String':
prefix: 'psfs'
body: 'private static final String'
'JUnit Test':
prefix: 'test'
body: """
@Test
public void ${1:testName}() {$0\n}
"""
'JUnit Test with Expected Exception':
prefix: 'testex'
body: """
@Test(expected=${1:Exception}.class)
public void ${2:throwsOnSomething}() {$0\n}
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment