1 18 package net.sf.drftpd.util; 19 20 import junit.framework.TestCase; 21 import junit.framework.TestSuite; 22 23 27 public class TimeTest extends TestCase { 28 29 public TimeTest(String name) { 30 super(name); 31 } 32 33 public static TestSuite suite() { 34 return new TestSuite(TimeTest.class); 35 } 36 public void testParseSeconds() { 37 assertEquals(1000, Time.parseTime("1s")); 38 assertEquals(1000, Time.parseTime("1S")); 39 } 40 public void testParseMillis() { 41 assertEquals(1, Time.parseTime("1ms")); 42 } 43 public void testParse() { 44 assertEquals(1, Time.parseTime("1")); 45 } 46 public void testParseMinutes() { 47 assertEquals(60000, Time.parseTime("1m")); 48 } 49 } 50 | Popular Tags |