1 7 22 23 package de.schlichtherle.util.zip; 24 25 import junit.framework.*; 26 import java.util.Calendar ; 27 import java.util.Date ; 28 29 32 public class ZipEntryTest extends TestCase { 33 34 private ZipEntry ze; 35 36 public ZipEntryTest(String testName) { 37 super(testName); 38 } 39 40 protected void setUp() throws Exception { 41 ze = new ZipEntry("test"); 42 } 43 44 protected void tearDown() throws Exception { 45 ze = null; 46 } 47 48 51 public void testSetTime() { 52 System.out.println("testSetTime"); 53 final long time = 0; ze.setTime(time); 55 final long time2 = ze.getTime(); 56 assertEquals("01.01.1970 01:00:00 CET", 58 java.text.MessageFormat.format("{0,date} {0,time,long}", 59 new Object [] { new Date (time) })); 60 assertEquals("01.01.1980 00:00:00 CET", 61 java.text.MessageFormat.format("{0,date} {0,time,long}", 62 new Object [] { new Date (time2) })); 63 } 64 } 65 | Popular Tags |