[Schmitzm-commits] r1423 - in trunk/schmitzm-core/src/test/java/de/schmitzm: . io versionnumber

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Jan 27 12:35:24 CET 2011


Author: alfonx
Date: 2011-01-27 12:35:23 +0100 (Thu, 27 Jan 2011)
New Revision: 1423

Added:
   trunk/schmitzm-core/src/test/java/de/schmitzm/versionnumber/
   trunk/schmitzm-core/src/test/java/de/schmitzm/versionnumber/ReleaseUtilTest.java
Modified:
   trunk/schmitzm-core/src/test/java/de/schmitzm/io/IOUtilTest.java
Log:


Modified: trunk/schmitzm-core/src/test/java/de/schmitzm/io/IOUtilTest.java
===================================================================
--- trunk/schmitzm-core/src/test/java/de/schmitzm/io/IOUtilTest.java	2011-01-27 11:30:45 UTC (rev 1422)
+++ trunk/schmitzm-core/src/test/java/de/schmitzm/io/IOUtilTest.java	2011-01-27 11:35:23 UTC (rev 1423)
@@ -70,6 +70,9 @@
 
 		assertEquals("exterme",
 				IOUtil.getFilename(new URL("http://www.bahn.de/exterme/")));
+		
+		assertEquals("exterme",
+				IOUtil.getFilename(new URL("http://www.bahn.de/exterme//")));
 
 		assertEquals("exterme",
 				IOUtil.getFilename(new URL("http://www.bahn.de/exterme")));

Added: trunk/schmitzm-core/src/test/java/de/schmitzm/versionnumber/ReleaseUtilTest.java
===================================================================
--- trunk/schmitzm-core/src/test/java/de/schmitzm/versionnumber/ReleaseUtilTest.java	2011-01-27 11:30:45 UTC (rev 1422)
+++ trunk/schmitzm-core/src/test/java/de/schmitzm/versionnumber/ReleaseUtilTest.java	2011-01-27 11:35:23 UTC (rev 1423)
@@ -0,0 +1,26 @@
+package de.schmitzm.versionnumber;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.log4j.Logger;
+import org.junit.Test;
+
+import de.schmitzm.testing.TestingClass;
+public class ReleaseUtilTest extends TestingClass {
+	private static Logger log = Logger.getLogger(ReleaseUtilTest.class);
+
+	@Test
+	public void testExtractMinVersionFromString() {
+		assertEquals(0,ReleaseUtil.extractMinVersionFromString("0.0"));
+		assertEquals(5,ReleaseUtil.extractMinVersionFromString("1.5-SNAPSHOT"));
+		assertEquals(5,ReleaseUtil.extractMinVersionFromString("1.5r234"));
+		
+		assertEquals(5,ReleaseUtil.extractMinVersionFromString("1.5r201009221756"),0.01);
+	}
+
+	@Test
+		public void testIsSnapshot()
+		{
+			System.out.println(ReleaseUtil.isSnapshot(ReleaseUtil.class));
+		}
+}
\ No newline at end of file


Property changes on: trunk/schmitzm-core/src/test/java/de/schmitzm/versionnumber/ReleaseUtilTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id URL
Name: svn:eol-style
   + native



More information about the Schmitzm-commits mailing list