Revision: 14799
          http://gate.svn.sourceforge.net/gate/?rev=14799&view=rev
Author:   markagreenwood
Date:     2011-12-16 17:05:45 +0000 (Fri, 16 Dec 2011)
Log Message:
-----------
reneabling the tests now that they are JUnit 3 compatible

Modified Paths:
--------------
    gate/trunk/plugins/Tagger_Measurements/build.xml
    
gate/trunk/plugins/Tagger_Measurements/test/src/gate/creole/measurements/MeasurementsTest.java

Modified: gate/trunk/plugins/Tagger_Measurements/build.xml
===================================================================
--- gate/trunk/plugins/Tagger_Measurements/build.xml    2011-12-16 16:42:17 UTC 
(rev 14798)
+++ gate/trunk/plugins/Tagger_Measurements/build.xml    2011-12-16 17:05:45 UTC 
(rev 14799)
@@ -74,12 +74,11 @@
 
        <target name="build" depends="jar" />
        <target name="distro.prepare" depends="clean.classes" />
-       
-       
-       <target name="test"  />
 
+
+       <!-- <target name="test"  /> -->
+
        <!-- Unit tests -->
-       <!--
        <property name="test.dir" location="test" />
        <property name="test.reports.dir" location="${test.dir}/reports" />
        <property name="test.src.dir" location="${test.dir}/src" />
@@ -110,6 +109,5 @@
                        </classpath>
                </junit>
        </target>
-       -->
 
 </project>

Modified: 
gate/trunk/plugins/Tagger_Measurements/test/src/gate/creole/measurements/MeasurementsTest.java
===================================================================
--- 
gate/trunk/plugins/Tagger_Measurements/test/src/gate/creole/measurements/MeasurementsTest.java
      2011-12-16 16:42:17 UTC (rev 14798)
+++ 
gate/trunk/plugins/Tagger_Measurements/test/src/gate/creole/measurements/MeasurementsTest.java
      2011-12-16 17:05:45 UTC (rev 14799)
@@ -9,40 +9,34 @@
 
 package gate.creole.measurements;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
 import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
 
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import junit.framework.TestCase;
 
 /**
  * @author Mark A. Greenwood
  */
-public class MeasurementsTest {
+public class MeasurementsTest extends TestCase {
 
   private static MeasurementsParser parser;
   
-  @BeforeClass
-  public static void setUp() throws MalformedURLException, IOException  {
+  @Override
+  public void setUp() throws MalformedURLException, IOException  {
     parser = new MeasurementsParser((new 
File("resources/units.dat")).toURI().toURL(), new 
File("resources/common_words.txt").toURI().toURL());    
   }
 
-  @AfterClass
-  public static void tearDown() {
+  @Override
+  public void tearDown() {
     parser = null;
   }
 
-  @Test
   public void test6Feet() {
     Measurement m = parser.parse(6d, "feet");
     assertNotNull(m);
     
     assertEquals("m", m.getNormalizedUnit());
+    assertEquals(6d, m.getValue());
   }
 }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to