<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: assert exception code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Sun, 07 Sep 2008 04:23:52 GMT</pubDate>
    <description>DZone Snippets: assert exception code</description>
    <item>
      <title>Exception Assertion Template For Eclipse</title>
      <link>http://snippets.dzone.com/posts/show/3673</link>
      <description>Eclipse template for exception assertion (Create template in Eclipse &gt; Preferences &gt; Java &gt; Editor &gt; Templates &gt; New ... OK)&lt;br /&gt;&lt;br /&gt;How to use: &lt;br /&gt;1. Select code throwing exception&lt;br /&gt;2. Alt + Shift + Z -&gt; select corresponding template.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;        try&lt;br /&gt;        {&lt;br /&gt;            ${line_selection}${cursor}&lt;br /&gt;            fail("${Exception} expected.");&lt;br /&gt;        }&lt;br /&gt;        catch (${Exception} e)&lt;br /&gt;        {&lt;br /&gt;            assertEquals(${message}, e.getMessage());&lt;br /&gt;        }&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Thu, 15 Mar 2007 12:00:15 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3673</guid>
      <author>guanzo (guanzo)</author>
    </item>
  </channel>
</rss>
