You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2010/10/05 02:38:10 UTC
svn commit: r1004485 -
/commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/environment/EnvironmentUtilTest.java
Author: sebb
Date: Tue Oct 5 00:38:10 2010
New Revision: 1004485
URL: http://svn.apache.org/viewvc?rev=1004485&view=rev
Log:
More info if assertions fail
Modified:
commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/environment/EnvironmentUtilTest.java
Modified: commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/environment/EnvironmentUtilTest.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/environment/EnvironmentUtilTest.java?rev=1004485&r1=1004484&r2=1004485&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/environment/EnvironmentUtilTest.java (original)
+++ commons/proper/exec/trunk/src/test/java/org/apache/commons/exec/environment/EnvironmentUtilTest.java Tue Oct 5 00:38:10 2010
@@ -59,11 +59,11 @@ public class EnvironmentUtilTest extends
Map procEnvironment = EnvironmentUtils.getProcEnvironment();
// we assume that there is at least one environment variable
// for this process, i.e. $JAVA_HOME
- assertTrue(procEnvironment.size() > 0);
+ assertTrue("Expecting non-zero environment size", procEnvironment.size() > 0);
String[] envArgs = EnvironmentUtils.toStrings(procEnvironment);
for(int i=0; i<envArgs.length; i++) {
- assertNotNull(envArgs[i]);
- assertTrue(envArgs[i].length() > 0);
+ assertNotNull("Entry "+i+" should not be null",envArgs[i]);
+ assertTrue("Entry "+i+" should not be empty",envArgs[i].length() > 0);
System.out.println(envArgs[i]);
}
}