Quantcast
Channel: hasCode.com
Viewing all articles
Browse latest Browse all 92

Handling System Properties, Environment Variables, STDOUT/STDERR in JUnit Tests with System Rules

$
0
0
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. System Rules is a collection of JUnit rules that helps us writing Java tests for everything that deals with java.lang.System. In the following short examples I’d like to demonstrate how to [...]

Viewing all articles
Browse latest Browse all 92

Trending Articles