1 31 32 package org.opencms.flex; 33 34 import junit.framework.TestCase; 35 36 43 public class TestCmsFlexCacheEntry extends TestCase { 44 45 50 public TestCmsFlexCacheEntry(String arg0) { 51 52 super(arg0); 53 } 54 55 58 public void testSetDateLastModifiedToPreviousTimeout() { 59 60 CmsFlexCacheEntry entry = new CmsFlexCacheEntry(); 61 long timeout = 1; 62 63 entry.complete(); 64 entry.setDateExpiresToNextTimeout(timeout); 65 entry.setDateLastModifiedToPreviousTimeout(timeout); 66 67 long timeExpire = entry.getDateExpires(); 68 long timeLastMod = entry.getDateLastModified(); 69 long timeoutDiff = (timeExpire - timeLastMod) / 60000; 70 assertEquals(timeout, timeoutDiff); 71 72 } 73 74 } 75 | Popular Tags |