[Schmitzm-commits] r1187 - in trunk: src/skrueger/versionnumber src_junit/schmitzm/swing

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Oct 28 00:46:45 CEST 2010


Author: alfonx
Date: 2010-10-28 00:46:45 +0200 (Thu, 28 Oct 2010)
New Revision: 1187

Modified:
   trunk/src/skrueger/versionnumber/ReleaseUtil.java
   trunk/src_junit/schmitzm/swing/TestingUtil.java
Log:


Modified: trunk/src/skrueger/versionnumber/ReleaseUtil.java
===================================================================
--- trunk/src/skrueger/versionnumber/ReleaseUtil.java	2010-10-27 14:56:27 UTC (rev 1186)
+++ trunk/src/skrueger/versionnumber/ReleaseUtil.java	2010-10-27 22:46:45 UTC (rev 1187)
@@ -70,7 +70,8 @@
 	private static Logger log = Logger.getLogger(ReleaseUtil.class);
 
 	/**
-	 * This is the main public API method which never throws an exception.
+	 * Returns all (the most) information in one sting. This is a public method
+	 * which never throws an Exception.
 	 * 
 	 * @param clazz
 	 *            Pass a class that resides in the same "project" or jar, where

Modified: trunk/src_junit/schmitzm/swing/TestingUtil.java
===================================================================
--- trunk/src_junit/schmitzm/swing/TestingUtil.java	2010-10-27 14:56:27 UTC (rev 1186)
+++ trunk/src_junit/schmitzm/swing/TestingUtil.java	2010-10-27 22:46:45 UTC (rev 1187)
@@ -44,7 +44,8 @@
 import schmitzm.geotools.io.GeoImportUtil;
 import schmitzm.io.IOUtil;
 import schmitzm.lang.LangUtil;
-
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 /**
  * Helpers to test Swing applications in general. <br/>
  * If not set to @Ignore, HUDSON will complain
@@ -384,4 +385,17 @@
 		return bi;
 	}
 
+	/**
+	 * @return Returns a freshly create new directory in the system's temp
+	 *         directory. TODO This would be a good place to register them to
+	 *         manage their deletion.
+	 * @throws IOException
+	 */
+	public static File getNewTempDir() throws IOException {
+		File file = new File(IOUtil.getTempDir(), File.createTempFile(
+				"deleteme", "").getName());
+		assertTrue(file.delete());
+		assertTrue(file.mkdir());
+		return file;
+	}
 }



More information about the Schmitzm-commits mailing list