DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Exception Assertion Template For Eclipse
Eclipse template for exception assertion (Create template in Eclipse > Preferences > Java > Editor > Templates > New ... OK)
How to use:
1. Select code throwing exception
2. Alt + Shift + Z -> select corresponding template.
try
{
${line_selection}${cursor}
fail("${Exception} expected.");
}
catch (${Exception} e)
{
assertEquals(${message}, e.getMessage());
}





