<?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"
	>

<channel>
	<title>sldblog</title>
	<atom:link href="http://sld.interhost.hu/sld/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://sld.interhost.hu/sld</link>
	<description>Dare to dream.</description>
	<pubDate>Mon, 07 Nov 2011 12:52:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Running only a group of test classes</title>
		<link>http://sld.interhost.hu/sld/index.php/2011/11/07/running-only-a-group-of-test-classes/</link>
		<comments>http://sld.interhost.hu/sld/index.php/2011/11/07/running-only-a-group-of-test-classes/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 12:43:30 +0000</pubDate>
		<dc:creator>sld</dc:creator>
		
		<category><![CDATA[English]]></category>

		<category><![CDATA[java]]></category>

		<category><![CDATA[junit]]></category>

		<category><![CDATA[mockito]]></category>

		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://sld.interhost.hu/sld/?p=87</guid>
		<description><![CDATA[Here&#8217;s how to run only a selected group of test classes. Specify your own Runner if you&#8217;re not using Mockito.

import java.util.ArrayList;
import java.util.List;

import org.junit.runner.Description;
import org.junit.runner.Runner;
import org.junit.runner.notification.Failure;
import org.junit.runner.notification.RunListener;
import org.junit.runner.notification.RunNotifier;
import org.junit.runners.Suite;
import org.junit.runners.model.InitializationError;
import org.junit.runners.model.RunnerBuilder;
import org.mockito.runners.MockitoJUnitRunner;

public class SelectedTestsRunner implements Runnable {

  public static void main(final String[] args) throws Throwable {
    final SelectedTestsRunner tests =
   [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how to run only a selected group of test classes. Specify your own <code>Runner</code> if you&#8217;re not using Mockito.</p>
<pre>
import java.util.ArrayList;
import java.util.List;

import org.junit.runner.Description;
import org.junit.runner.Runner;
import org.junit.runner.notification.Failure;
import org.junit.runner.notification.RunListener;
import org.junit.runner.notification.RunNotifier;
import org.junit.runners.Suite;
import org.junit.runners.model.InitializationError;
import org.junit.runners.model.RunnerBuilder;
import org.mockito.runners.MockitoJUnitRunner;

public class SelectedTestsRunner implements Runnable {

  public static void main(final String[] args) throws Throwable {
    final SelectedTestsRunner tests =
        new SelectedTestsRunner(new RunnerBuilder() {
          @Override
          public Runner runnerForClass(final Class&lt;?&gt; theClass)
              throws Throwable {
            return new MockitoJUnitRunner(theClass);
          }
        });
    tests.add(<em>MyTestClass1</em>.class);
    tests.add(<em>MyTestClass2</em>.class);
    tests.run();
  }

  private final RunnerBuilder builder;

  private final List&lt;Class&lt;?&gt;&gt; tests;

  public SelectedTestsRunner(final RunnerBuilder builder) {
    this.builder = builder;
    tests = new ArrayList&lt;Class&lt;?&gt;&gt;();
  }

  private void add(final Class&lt;?&gt; testClass) {
    tests.add(testClass);
  }

  @Override
  public void run() {
    Runner runner = null;
    try {
      runner = new Suite(builder, tests.toArray(new Class[0]));
    } catch (final InitializationError e) {
      e.printStackTrace();
      return;
    }

    final RunNotifier notifier = new RunNotifier();
    final ProgressListener progressListener = new ProgressListener();
    notifier.addListener(progressListener);
    runner.run(notifier);

    final StringBuilder status = new StringBuilder();
    status.append(&#8221;\nSuccessful: &#8221; + progressListener.getSuccessCount());
    status.append(&#8221;\n    Failed: &#8221; + progressListener.getFailCount());

    System.err.println(status.toString());
    progressListener.processFails(new FailProcessor() {
      @Override
      public void process(final Failure failure) {
        if (failure.getException() != null) {
          failure.getException().printStackTrace();
        }
      }
    });
  }

  private static class ProgressListener extends RunListener {

    private final List&lt;Failure&gt; fails = new ArrayList&lt;Failure&gt;();

    private final List&lt;Description&gt; finished = new ArrayList&lt;Description&gt;();

    @Override
    public void testFinished(final Description description) throws Exception {
      super.testFinished(description);
      finished.add(description);
    }

    @Override
    public void testFailure(final Failure failure) throws Exception {
      super.testFailure(failure);
      fails.add(failure);
    }

    public int getSuccessCount() {
      return finished.size() - fails.size();
    }

    public int getFailCount() {
      return fails.size();
    }

    public void processFails(final FailProcessor processor) {
      for (final Failure fail : fails) {
        processor.process(fail);
      }
    }

  }

  private interface FailProcessor {
    void process(Failure failure);
  }

}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://sld.interhost.hu/sld/index.php/2011/11/07/running-only-a-group-of-test-classes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Travel Freely</title>
		<link>http://sld.interhost.hu/sld/index.php/2008/03/19/travel-freely/</link>
		<comments>http://sld.interhost.hu/sld/index.php/2008/03/19/travel-freely/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 08:16:58 +0000</pubDate>
		<dc:creator>sld</dc:creator>
		
		<category><![CDATA[English]]></category>

		<guid isPermaLink="false">http://sld.interhost.hu/sld/index.php/2008/03/19/travel-freely/</guid>
		<description><![CDATA[R.I.P.
Sir Arthur C. Clarke.
1917-2008
]]></description>
			<content:encoded><![CDATA[<p>R.I.P.<br />
Sir Arthur C. Clarke.<br />
1917-2008</p>
]]></content:encoded>
			<wfw:commentRss>http://sld.interhost.hu/sld/index.php/2008/03/19/travel-freely/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Térképpel szűrni</title>
		<link>http://sld.interhost.hu/sld/index.php/2008/01/27/terkeppel-szurni/</link>
		<comments>http://sld.interhost.hu/sld/index.php/2008/01/27/terkeppel-szurni/#comments</comments>
		<pubDate>Sun, 27 Jan 2008 20:24:26 +0000</pubDate>
		<dc:creator>sld</dc:creator>
		
		<category><![CDATA[Magyar]]></category>

		<category><![CDATA[market]]></category>

		<category><![CDATA[realty]]></category>

		<guid isPermaLink="false">http://sld.interhost.hu/sld/index.php/2008/01/27/terkeppel-szurni/</guid>
		<description><![CDATA[Kéretlen reklám&#8230; De annyira megtetszett hogy tessék: realorigo. Használható, Google Maps, normális szűrés mindenre ami nekem kellett. Örülök hogy van ilyen. Majdnem lefelejtettem: ingatlankereső.
]]></description>
			<content:encoded><![CDATA[<p>Kéretlen reklám&#8230; De annyira megtetszett hogy tessék: <a href="http://realorigo.hu/" onclick="javascript:pageTracker._trackPageview ('/outbound/realorigo.hu');">realorigo</a>. Használható, Google Maps, normális szűrés mindenre ami nekem kellett. Örülök hogy van ilyen. Majdnem lefelejtettem: ingatlankereső.</p>
]]></content:encoded>
			<wfw:commentRss>http://sld.interhost.hu/sld/index.php/2008/01/27/terkeppel-szurni/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Worlds</title>
		<link>http://sld.interhost.hu/sld/index.php/2007/11/02/worlds/</link>
		<comments>http://sld.interhost.hu/sld/index.php/2007/11/02/worlds/#comments</comments>
		<pubDate>Fri, 02 Nov 2007 20:54:56 +0000</pubDate>
		<dc:creator>sld</dc:creator>
		
		<category><![CDATA[English]]></category>

		<category><![CDATA[Arthur C. Clarke]]></category>

		<category><![CDATA[book]]></category>

		<category><![CDATA[Odyssey]]></category>

		<guid isPermaLink="false">http://sld.interhost.hu/sld/index.php/2007/11/02/worlds/</guid>
		<description><![CDATA[Sir Arthur C. Clarke writes in the Foreword of 2001: A Space Odyssey:
Behind every man now alive stand thirty ghosts, for that is the ratio by which the dead outnumber the living. Since the dawn of time, roughly a hundred billion human beings have walked the planet Earth.
Now this is an interesting number, for by [...]]]></description>
			<content:encoded><![CDATA[<p><em>Sir Arthur C. Clarke</em> writes in the Foreword of <em>2001: A Space Odyssey</em>:</p>
<blockquote><p>Behind every man now alive stand thirty ghosts, for that is the ratio by which the dead outnumber the living. Since the dawn of time, roughly a hundred billion human beings have walked the planet Earth.</p>
<p>Now this is an interesting number, for by curious coincidence there are approximately a hundred billion stars in our local universe, the Milky Way. So for every man who has ever lived, in this Universe there shines a star.</p>
<p><em>[&#8230;]</em> almost certainly there is enough land in the sky to give every member of the human species, back to the first ape-man, his own private, world-size heaven&#8212;or hell.</p></blockquote>
<p>No point of this post, except that these lines really caught me. All four of <em>Space Odyssey</em> books have the eerie ability to cause shivers going down your spine.</p>
]]></content:encoded>
			<wfw:commentRss>http://sld.interhost.hu/sld/index.php/2007/11/02/worlds/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Fényév távolság</title>
		<link>http://sld.interhost.hu/sld/index.php/2007/10/04/fenyev-tavolsag/</link>
		<comments>http://sld.interhost.hu/sld/index.php/2007/10/04/fenyev-tavolsag/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 23:31:34 +0000</pubDate>
		<dc:creator>sld</dc:creator>
		
		<category><![CDATA[Magyar]]></category>

		<category><![CDATA[musical]]></category>

		<category><![CDATA[Padlás]]></category>

		<guid isPermaLink="false">http://sld.interhost.hu/sld/index.php/2007/10/04/fenyev-tavolsag/</guid>
		<description><![CDATA[Voltunk ugye a Padlás című musicalen, de csak most néztem szét YouTube-on, és találtam egy kis ízelítőt azoknak, akik gondolkodnak a dolgon. A díszlet még mindig ugyanaz (a Vígszínházban készítették a felvételt).

In memoriam Kaszás Attila.
]]></description>
			<content:encoded><![CDATA[<p>Voltunk ugye a Padlás című musicalen, de csak most néztem szét YouTube-on, és találtam egy kis ízelítőt azoknak, akik gondolkodnak a dolgon. A díszlet még mindig ugyanaz (a Vígszínházban készítették a felvételt).</p>
<div class="picasa"><iframe width="420" height="315" src="http://www.youtube.com/embed/F2H-ntxVDOk" frameborder="0" allowfullscreen></iframe></div>
<p>In memoriam Kaszás Attila.</p>
]]></content:encoded>
			<wfw:commentRss>http://sld.interhost.hu/sld/index.php/2007/10/04/fenyev-tavolsag/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
