<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Rulechain on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/rulechain/</link>
    <description>Recent content in Rulechain on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo -- 0.147.8</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #213243b1d6e8932079e09227d3f3ed0c806cd0c9</copyright>
    <lastBuildDate>Tue, 21 Feb 2012 00:00:00 +0100</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/rulechain/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Ordering your JUnit Rules using a RuleChain</title>
      <link>https://www.hascode.com/ordering-your-junit-rules-using-a-rulechain/</link>
      <pubDate>Tue, 21 Feb 2012 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/ordering-your-junit-rules-using-a-rulechain/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;JUnit Rules are a handy solution if one needs to alter test methods or wants to share common functionality between several test cases. JUnit 4.10 introduced a new class to order several rules according to our needs using a so called rule-chain.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following example, we’re going to create a simple custom rule and afterwards bind several instances of it in a specified order to a test method.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_adding_junit&#34;&gt;Adding JUnit&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Just one Maven dependency needed here – JUnit 4.10&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
