<?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>System on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/system/</link>
    <description>Recent content in System 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>Mon, 19 Dec 2016 00:00:00 +0100</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/system/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Handling System Properties, Environment Variables, STDOUT/STDERR in JUnit Tests with System Rules</title>
      <link>https://www.hascode.com/handling-system-properties-environment-variables-stdout/stderr-in-junit-tests-with-system-rules/</link>
      <pubDate>Mon, 19 Dec 2016 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/handling-system-properties-environment-variables-stdout/stderr-in-junit-tests-with-system-rules/</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;When important data is written to STDIN/STDOUT and an application relies on specific system properties or environment variables, writing tests is getting more complicated.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;System Rules is a collection of JUnit rules that helps us writing Java tests for everything that deals with java.lang.System.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In the following short examples I’d like to demonstrate how to deal with system properties, environment variables, STDOUT and STDERR and capturing both for testing e.g. for some golden master refactoring.&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
