⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testcachemapaccessevent.java

📁 一个不错的cache
💻 JAVA
字号:
/* * Copyright (c) 2002-2003 by OpenSymphony * All rights reserved. */package com.opensymphony.oscache.base.events;import com.opensymphony.oscache.base.CacheEntry;import junit.framework.Test;import junit.framework.TestCase;import junit.framework.TestSuite;/** * This is the test class for the CacheMapAccessEvent class. It checks that the * public methods are working properly * * $Id: TestCacheMapAccessEvent.java,v 1.1 2003/07/19 09:58:49 chris_miller Exp $ * @version        $Revision: 1.1 $ * @author <a href="mailto:abergevin@pyxis-tech.com">Alain Bergevin</a> */public final class TestCacheMapAccessEvent extends TestCase {    private final String KEY = "Test cache map access event key";    /**     * Constructor     * <p>     * @param str The test name (required by JUnit)     */    public TestCacheMapAccessEvent(String str) {        super(str);    }    /**     * This methods returns the name of this test class to JUnit     * <p>     * @return The test for this class     */    public static Test suite() {        return new TestSuite(TestCacheMapAccessEvent.class);    }    /**     * Test the CacheMapAccessEvent class     */    public void testCacheMapAccessEvent() {        // Create an object and check the parameters        CacheEntry entry = new CacheEntry(KEY);        CacheMapAccessEvent event = new CacheMapAccessEvent(CacheMapAccessEventType.HIT, entry);        assertEquals(event.getCacheEntry(), entry);        assertEquals(event.getCacheEntryKey(), KEY);        assertEquals(event.getEventType(), CacheMapAccessEventType.HIT);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -