Changeset 10622

Show
Ignore:
Timestamp:
04/28/08 10:44:10 (5 years ago)
Author:
ewigkeit
Message:

使用するJUnitを4.xに。それに伴うテストコードのrefactor。

Location:
lang/java/postter/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lang/java/postter/trunk

    • Property svn:ignore set to
      .*
      target
  • lang/java/postter/trunk/pom.xml

    r10514 r10622  
    6161                        <groupId>junit</groupId> 
    6262                        <artifactId>junit</artifactId> 
    63                         <version>3.8.1</version> 
     63                        <version>4.4</version> 
    6464                        <scope>test</scope> 
    6565                </dependency> 
  • lang/java/postter/trunk/src/test/java/org/cactusman/util/UtilTest.java

    r10467 r10622  
    11package org.cactusman.util; 
    22 
    3 import org.cactusman.util.Util; 
     3import static org.junit.Assert.assertFalse; 
     4import static org.junit.Assert.assertTrue; 
    45 
    5 import junit.framework.TestCase; 
     6import org.junit.Test; 
    67 
    7 public class UtilTest extends TestCase{ 
     8public class UtilTest { 
    89         
     10        @Test 
    911        public void testStringNull(){ 
    1012                assertFalse(Util.stringChecker(null)); 
    1113        } 
    1214         
     15        @Test 
    1316        public void testStringLengthZero(){ 
    1417                assertFalse(Util.stringChecker("")); 
    1518        } 
    1619         
     20        @Test 
    1721        public void testStringLengthNonZero(){ 
    1822                assertTrue(Util.stringChecker(" ")); 
    1923        } 
     24 
    2025}