Exception Assertion Template For Eclipse
Join the DZone community and get the full member experience.
Join For FreeEclipse 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());
}
Template
Eclipse
Assertion (software development)
Opinions expressed by DZone contributors are their own.
Comments