<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Developers, Developers, Developers! &#187; JUnit 4</title>
	<atom:link href="http://maksim.sorokin.dk/it/tag/junit-4/feed/" rel="self" type="application/rss+xml" />
	<link>http://maksim.sorokin.dk/it</link>
	<description>Maksim Sorokin IT Blog</description>
	<lastBuildDate>Sun, 05 Feb 2012 19:37:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Tests in Tycho</title>
		<link>http://maksim.sorokin.dk/it/2010/12/21/tests-in-tycho/</link>
		<comments>http://maksim.sorokin.dk/it/2010/12/21/tests-in-tycho/#comments</comments>
		<pubDate>Tue, 21 Dec 2010 16:24:42 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[JUnit]]></category>
		<category><![CDATA[JUnit 4]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[tycho]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=461</guid>
		<description><![CDATA[In Tycho tests expected to have the following name pattern: **/Test*.java, **/*Test.java and **/*TestCase.java. By default, the following is excluded: **/Abstract*Test.java**/Abstract*TestCase.java and **/*$*. If you want to change excluded and included tests, in your test fragment you have to add something like the following: &#60;build&#62; &#60;plugins&#62; &#60;plugin&#62; &#60;groupId&#62;org.sonatype.tycho&#60;/groupId&#62; &#60;artifactId&#62;maven-osgi-test-plugin&#60;/artifactId&#62; &#60;version&#62;${tycho-version}&#60;/version&#62; &#60;configuration&#62; &#60;excludes&#62; &#60;exclude&#62;**/BasicTest.java&#60;/exclude&#62; &#60;/excludes&#62; &#60;includes&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>In Tycho tests expected to have the following name pattern: <code>**/Test*.java</code>, <code>**/*Test.java</code> and <code>**/*TestCase.java</code>. By default, the following is excluded: <code>**/Abstract*Test.java</code>**/Abstract*TestCase.java and <code>**/*$*</code>.</p>
<p>If you want to change excluded and included tests, in your test fragment you have to add something like the following:</p>
<pre class="brush: xml; title: ;">
&lt;build&gt;
  &lt;plugins&gt;
    &lt;plugin&gt;
      &lt;groupId&gt;org.sonatype.tycho&lt;/groupId&gt;
      &lt;artifactId&gt;maven-osgi-test-plugin&lt;/artifactId&gt;
      &lt;version&gt;${tycho-version}&lt;/version&gt;
      &lt;configuration&gt;
        &lt;excludes&gt;
          &lt;exclude&gt;**/BasicTest.java&lt;/exclude&gt;
        &lt;/excludes&gt;
        &lt;includes&gt;
          &lt;include&gt;**/CalcRunnerCase.java&lt;/include&gt;
        &lt;/includes&gt;
      &lt;/configuration&gt;
    &lt;/plugin&gt;
  &lt;/plugins&gt;
&lt;/build&gt;
</pre>
<p>Keep in mind, that if tycho will not find any tests, it will fail! See <a href="https://issues.sonatype.org/browse/TYCHO-545">discussion on issue tracker</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/12/21/tests-in-tycho/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse &#8220;Favorites&#8221; and JUnit 4 Static Imports Revised</title>
		<link>http://maksim.sorokin.dk/it/2010/03/23/eclipse-favorites-and-junit-4-static-imports-revised/</link>
		<comments>http://maksim.sorokin.dk/it/2010/03/23/eclipse-favorites-and-junit-4-static-imports-revised/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 17:54:14 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[EasyMock]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[JUnit 4]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=102</guid>
		<description><![CDATA[After some time of using static imports workaround for JUnit 4 and EasyMock described earlier I came to the conclusion, that editing import "favorites" is not a good idea. The problem is that when you include a class with static methods in Eclipse "favorites", then in Content Assistant you see hundred of those static methods. [...]]]></description>
			<content:encoded><![CDATA[<p>After some time of using static imports workaround for JUnit 4 and EasyMock <a href="http://maksim.sorokin.dk/it/2010/02/12/eclipse-and-junit-4-static-imports/">described earlier</a> I came to the conclusion, that editing import "favorites" is not a good idea.</p>
<p>The problem is that when you include a class with static methods in Eclipse "favorites", then in Content Assistant you see hundred of those static methods. This maybe somewhat inconvenient. Moreover, Content Assistant hangs a bit longer before appearing.</p>
<p>From now on I am directly using class name like <code>Assert.assert..</code> or <code>EasyMock.expect..</code> instead of using static imports.</p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/03/23/eclipse-favorites-and-junit-4-static-imports-revised/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eclipse and JUnit 4 Static Imports</title>
		<link>http://maksim.sorokin.dk/it/2010/02/12/eclipse-and-junit-4-static-imports/</link>
		<comments>http://maksim.sorokin.dk/it/2010/02/12/eclipse-and-junit-4-static-imports/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 20:17:56 +0000</pubDate>
		<dc:creator>Maksim Sorokin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[JUnit 4]]></category>

		<guid isPermaLink="false">http://maksim.sorokin.dk/it/?p=61</guid>
		<description><![CDATA[Importing static JUnit 4 annotations in Eclipse is somewhat boring. The thing is that by default Eclipse doesn't import static fields or methods. The most optimal way is to add junit.framework.Assert to "favorite" static types. Then, assertion methods will be seen in editor. How to: Menu -&#62; Window -&#62; Preferences Java -&#62; Editor -&#62; Content [...]]]></description>
			<content:encoded><![CDATA[<p>Importing static JUnit 4 annotations in Eclipse is somewhat boring. The thing is that by default Eclipse doesn't import static fields or methods.</p>
<p>The most optimal way is to add <code>junit.framework.Assert</code> to "favorite" static types. Then, assertion methods will be seen in editor.<br />
How to:</p>
<ul>
<li>Menu -&gt; Window -&gt; Preferences</li>
<li>Java -&gt; Editor -&gt; Content Assist -&gt; Favorites</li>
<li>New Type: <code>junit.framework.Assert</code></li>
</ul>
<p>P.S.: idea taken from <a href="http://blog.xebia.com/2008/10/12/eclipse-tip-keep-static-imports-for-junit-4/">http://blog.xebia.com/2008/10/12/eclipse-tip-keep-static-imports-for-junit-4/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://maksim.sorokin.dk/it/2010/02/12/eclipse-and-junit-4-static-imports/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

