亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? testcacheentry.java

?? oscache-2.4.1-full
?? JAVA
字號:
/*
 * Copyright (c) 2002-2003 by OpenSymphony
 * All rights reserved.
 */
package com.opensymphony.oscache.base;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

/**
 * Test the public methods of the CacheEntry class
 *
 * $Id: TestCacheEntry.java 254 2005-06-17 05:07:38Z dres $
 * @version        $Revision: 254 $
 * @author <a href="mailto:abergevin@pyxis-tech.com">Alain Bergevin</a>
 */
public class TestCacheEntry extends TestCase {
    // Static variables required thru the tests
    static CacheEntry entry = null;
    static long beforeCreation = 0;
    static long afterCreation = 0;
    private final String CONTENT = "Content for the cache entry test";

    // Constants used thru the tests
    private final String ENTRY_KEY = "Test cache entry key";
    private final int NO_REFRESH_NEEDED = 1000000;
    private final int REFRESH_NEEDED = 0;

    /**
     * Class constructor
     * <p>
     * @param str The test name (required by JUnit)
     */
    public TestCacheEntry(String str) {
        super(str);
    }

    /**
     * This method is invoked before each testXXXX methods of the
     * class. It set ups the variables required for each tests.
     */
    public void setUp() {
        // At first invocation, create a cache entry object
        if (entry == null) {
            // Log the time before and after to verify the creation time
            // in one of the tests
            beforeCreation = System.currentTimeMillis();

            entry = new CacheEntry(ENTRY_KEY);
            afterCreation = System.currentTimeMillis();
        }
    }

    /**
     * This methods returns the name of this test class to JUnit
     * <p>
     * @return The name of this class
     */
    public static Test suite() {
        return new TestSuite(TestCacheEntry.class);
    }

    /**
     * Verify the flush
     */
    public void testFlush() {
        // Set the content so it shouldn't need refresh
        entry.setContent(CONTENT);
        assertTrue(!entry.needsRefresh(NO_REFRESH_NEEDED));

        // Flush the entry. It should now needs refresh
        entry.flush();
        assertTrue(entry.needsRefresh(NO_REFRESH_NEEDED));
    }

    /**
     * Verify that the creation time is correct
     */
    public void testGetCreated() {
        assertBetweenOrEquals(beforeCreation, entry.getCreated(), afterCreation);
    }

    /**
     * Retrieve the item created by the setup
     */
    public void testGetKey() {
        assertTrue(entry.getKey().equals(ENTRY_KEY));
    }

    /**
     * Verify that the last modification time is between the time before and
     * after the alteration of the item
     */
    public void testGetLastUpdate() {
        // again. Then we ensure that the update time is between our timestamps
        long before = System.currentTimeMillis();
        entry.setContent(CONTENT);

        long after = System.currentTimeMillis();
        assertBetweenOrEquals(before, entry.getLastUpdate(), after);
    }

    /**
     * Verify that the "freshness detection" function properly
     */
    public void testNeedsRefresh() {
        // Set the entry content so it shouldn't need refresh
        // Invoke needsRefresh with no delay, so it should return true.
        // Then invoke it with a big delay, so it should return false
        assertTrue(entry.needsRefresh(REFRESH_NEEDED));
        assertTrue(!entry.needsRefresh(NO_REFRESH_NEEDED));
    }

    /**
     * Set the content of the item created by setup and then retrieve it and
     * validate it
     */
    public void testSetGetContent() {
        entry.setContent(CONTENT);
        assertTrue(CONTENT.equals(entry.getContent()));

        // Ensure that nulls are allowed
        entry.setContent(null);
        assertNull(entry.getContent());
    }

    /**
     * Ensure that a value is between two others. Since the execution may be
     * very fast, equals values are also considered to be between
     */
    private void assertBetweenOrEquals(long first, long between, long last) {
        assertTrue(between >= first);
        assertTrue(between <= last);
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲综合一二三区| 久久久久亚洲蜜桃| 国产高清视频一区| 亚洲精品视频一区| 久久人人爽爽爽人久久久| 在线视频综合导航| 国产乱子伦视频一区二区三区| 亚洲免费在线电影| 精品国精品国产| 欧美曰成人黄网| 国产suv一区二区三区88区| 午夜电影久久久| 中文字幕一区二区三区色视频| 精品蜜桃在线看| 在线播放欧美女士性生活| 91视频xxxx| 国产成人av影院| 狠狠色综合播放一区二区| 一区二区三区在线观看国产| 久久精品欧美日韩| 欧美成人一级视频| 欧美高清视频一二三区 | 欧美日韩国产高清一区二区三区 | 欧美精品视频www在线观看| caoporen国产精品视频| 韩国av一区二区三区四区| 亚洲午夜久久久久中文字幕久| 中文字幕精品三区| 久久久久久久久久久99999| 日韩亚洲欧美一区| 欧美精品在线观看播放| 在线观看网站黄不卡| 91免费在线播放| 99精品黄色片免费大全| 成人a区在线观看| 国产成人亚洲综合a∨婷婷| 久久99国产精品尤物| 蜜桃久久久久久久| 欧美96一区二区免费视频| 偷拍亚洲欧洲综合| 午夜电影网一区| 日产精品久久久久久久性色| 日韩激情av在线| 天堂一区二区在线| 日韩国产精品大片| 欧美a级理论片| 激情都市一区二区| 国产精品自拍av| 丁香另类激情小说| 波多野结衣亚洲| 91视频你懂的| 欧美视频一区二区三区四区| 欧美日韩在线直播| 欧美日韩免费电影| 欧美一区二区三区白人| 精品乱人伦小说| 26uuu国产电影一区二区| 久久免费电影网| 国产精品不卡在线| 亚洲精品视频在线看| 亚洲v中文字幕| 麻豆一区二区三区| 春色校园综合激情亚洲| 色综合久久88色综合天天免费| 91福利视频在线| 欧美精品日韩精品| 精品成人免费观看| 国产精品美女一区二区在线观看| 国产精品久久久久aaaa| 一区二区三区久久久| 天堂av在线一区| 国产乱码精品1区2区3区| 99国产精品99久久久久久| 欧美日韩精品一区二区三区四区 | 91精品蜜臀在线一区尤物| 精品奇米国产一区二区三区| 国产欧美日韩麻豆91| 洋洋av久久久久久久一区| 免费观看久久久4p| 不卡的av在线播放| 欧美精品tushy高清| 国产蜜臀97一区二区三区| 亚洲午夜精品在线| 国产一区二区三区日韩| 色综合天天综合网天天狠天天 | 欧美熟乱第一页| 精品日韩一区二区三区免费视频| 最新高清无码专区| 免费在线观看一区| 99综合影院在线| 欧美一区二区三区免费视频 | 日韩三级.com| 日韩理论片网站| 久久国产乱子精品免费女| 色综合天天视频在线观看| 精品伦理精品一区| 亚洲成人av一区二区| 高清成人免费视频| 欧美日韩电影在线播放| 国产精品毛片高清在线完整版 | 国产在线国偷精品产拍免费yy| 91久久人澡人人添人人爽欧美| www欧美成人18+| 婷婷久久综合九色国产成人| 99久久亚洲一区二区三区青草| 91精品国产综合久久香蕉麻豆| 国产精品久久久久aaaa| 国产一区福利在线| 7777女厕盗摄久久久| 成人欧美一区二区三区视频网页 | 亚洲国产高清不卡| 久久精品国产一区二区三区免费看| 91视视频在线观看入口直接观看www| 久久女同精品一区二区| 日韩av午夜在线观看| 色婷婷综合久久久中文字幕| 欧美激情综合在线| 国产综合色精品一区二区三区| 这里只有精品视频在线观看| 一区二区三区中文字幕在线观看| 高清免费成人av| 久久久久久一二三区| 美女在线视频一区| 欧美嫩在线观看| 夜夜精品视频一区二区| 日本二三区不卡| 亚洲激情图片qvod| 色婷婷亚洲精品| 亚洲视频每日更新| 一本大道av伊人久久综合| 国产精品国产馆在线真实露脸| 国产成人精品免费| 久久一二三国产| 国产一区91精品张津瑜| 26uuu亚洲综合色欧美| 精品一区二区三区在线播放 | 亚洲人成伊人成综合网小说| 高清成人在线观看| 综合激情成人伊人| 99久久久免费精品国产一区二区| 一区视频在线播放| 色先锋久久av资源部| 亚洲激情在线激情| 欧美日本乱大交xxxxx| 丝袜美腿一区二区三区| 欧美肥妇毛茸茸| 琪琪一区二区三区| 日韩欧美资源站| 全部av―极品视觉盛宴亚洲| 色综合久久天天综合网| 亚洲理论在线观看| 91丨porny丨蝌蚪视频| 亚洲欧美日韩国产手机在线 | 天天影视网天天综合色在线播放 | 欧美写真视频网站| 亚洲午夜羞羞片| 日本高清无吗v一区| 性久久久久久久| 欧美肥妇毛茸茸| 久久精品国产99久久6| 国产亚洲人成网站| 成人午夜精品一区二区三区| 国产日本欧美一区二区| 岛国一区二区三区| 亚洲福利一区二区| 欧美精品日韩一本| 免费观看在线色综合| 欧美二区在线观看| 国产精品99久久久久久似苏梦涵 | 韩国女主播成人在线观看| 秋霞电影一区二区| 欧美精品电影在线播放| 日韩二区三区在线观看| 欧美电视剧在线看免费| 国产在线视频精品一区| 中文子幕无线码一区tr| 91视频国产资源| 婷婷六月综合亚洲| 欧美激情一区二区三区在线| 91免费小视频| 日韩精品电影在线| 欧美精品一区二区久久婷婷| 色综合一区二区| 日本亚洲免费观看| 国产日产精品一区| 在线免费观看成人短视频| 日本伊人色综合网| 国产三级精品在线| 日本韩国一区二区三区| 亚洲国产精品一区二区www| 久久久久久久久岛国免费| 91丨porny丨首页| 麻豆精品视频在线| 国产校园另类小说区| 在线成人午夜影院| 粉嫩久久99精品久久久久久夜| 亚洲综合男人的天堂| 国产精品免费av| 91精品国产欧美一区二区18| 国产99久久久国产精品潘金|