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

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

?? statisticmanagertest.java

?? 一個javabean的轉換與copy非常的好用希望大家好好研究一下
?? JAVA
字號:
/*
 * Copyright 2005-2007 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.sf.dozer.util.mapping.stats;

import java.util.HashSet;
import java.util.Set;

import net.sf.dozer.util.mapping.DozerTestBase;
import net.sf.dozer.util.mapping.exception.NotFoundException;

/**
 * @author tierney.matt
 */
public class StatisticManagerTest extends DozerTestBase {
  private StatisticsManager statMgr;
  
  protected void setUp() throws Exception {
    super.setUp();
	  statMgr = new StatisticsManager();
	  statMgr.setStatisticsEnabled(true);
  }
  
  public void testAddAndGetStatistic() {
    String type = getRandomString();
    Statistic stat = new Statistic(type);
    statMgr.addStatistic(stat);
    
    assertEquals("invalid stat size", 1, statMgr.getStatistics().size());
    assertEquals("invalid stat found", stat, statMgr.getStatistic(type));
    assertTrue("invalid stat ref found", stat == statMgr.getStatistic(type));
  }
  
  public void testSetStatisticsEnabled() {
    boolean value = true;
    if (statMgr.isStatisticsEnabled()) {
      value = false;
    }
    statMgr.setStatisticsEnabled(value);
    assertEquals("invalid stats enabled value", value, statMgr.isStatisticsEnabled());
  }
  
  public void testClearAll() {
    String type = getRandomString();
    statMgr.addStatistic(new Statistic(type));
    statMgr.addStatistic(new Statistic(type+"2"));
    assertEquals("invalid initial stat size", 2, statMgr.getStatistics().size());
    statMgr.clearAll();
    assertEquals("invalid stat size", 0, statMgr.getStatistics().size());
  }
  
  public void testGetStatiticNotFound() {
    try {
      statMgr.getStatistic(getRandomString());
      fail("should have thrown not found exception");
    } catch(NotFoundException e) {
    }
  }
  
  public void testGetStatisticTypes() {
    String type = getRandomString();
    String type2 = type + "-2";
    statMgr.addStatistic(new Statistic(type));
    statMgr.addStatistic(new Statistic(type2));
    
    Set expected = new HashSet();
    expected.add(type);
    expected.add(type2);

    assertEquals("invalid stat types found", expected, statMgr.getStatisticTypes());
  }
  
  public void testIncrementMissingParams()  {
    try {
      statMgr.increment(null, "test", 1);
      fail("missing type should have thrown exception");
    } catch (IllegalArgumentException e) {
    }
    
    try {
      statMgr.increment("test2", null, 1);
      fail("missing entry key should have thrown exception");
    } catch (IllegalArgumentException e) {
    }
  }
  
  public void testGetStatisticValue() {
    String type = getRandomString();
    Statistic stat = new Statistic(type);
    String entryKey = getRandomString();
    stat.addEntry(new StatisticEntry(entryKey));

    statMgr.addStatistic(stat);
    statMgr.increment(type, entryKey, 100);
    
    assertEquals("invalid entry value", 100, statMgr.getStatisticValue(type));
  }
  
  public void testGetStatisticValueException() {
    String type = getRandomString();
    Statistic stat = new Statistic(type);
    
    stat.addEntry(new StatisticEntry(getRandomString()));
    stat.addEntry(new StatisticEntry(getRandomString()));
    statMgr.addStatistic(stat);
    
    try {
      statMgr.getStatisticValue(type);
      fail("trying to get stat value for type that has more than 1 entry should throw exception");
    } catch (IllegalArgumentException e) {
    }
  }
  
  public void testAddDuplicateStatistic() {
    String type = getRandomString();
    statMgr.addStatistic(new Statistic(type));
    
    try {
      statMgr.addStatistic(new Statistic(type));
      fail("add duplicate stat should have thrown exception");
    } catch (IllegalArgumentException e) {
    }
  }
  
  public void testIncrementUnknownTypeAndKey() {
    String type = getRandomString();
    String entryKey = getRandomString();
    long incrementValue = 130;
    statMgr.increment(type, entryKey, incrementValue);
    
    assertEquals("invalid stat entry value", incrementValue, statMgr.getStatisticValue(type));
  } 
  
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久久高清精品| 成人av午夜电影| 一区二区不卡在线视频 午夜欧美不卡在 | 久久综合av免费| 日韩欧美在线123| 88在线观看91蜜桃国自产| 欧美日韩精品三区| 欧美精品在线观看播放| 欧美日韩国产a| 欧美巨大另类极品videosbest| 欧美日韩一本到| 555www色欧美视频| 日韩免费观看高清完整版在线观看| 欧美久久一二区| 欧美白人最猛性xxxxx69交| 欧美精品一区二区精品网| 久久久久国产精品厨房| 亚洲视频一区在线| 一区二区不卡在线播放| 日本欧美肥老太交大片| 国产乱子伦视频一区二区三区| 国产精品888| 一本到三区不卡视频| 欧美夫妻性生活| 久久免费视频一区| 亚洲一区二区三区中文字幕| 蜜臀av性久久久久蜜臀av麻豆| 精品一区二区三区免费毛片爱| 成人午夜看片网址| 欧美日韩一区在线| 国产亚洲人成网站| 亚洲愉拍自拍另类高清精品| 免费高清在线一区| av色综合久久天堂av综合| 91福利在线导航| 久久亚洲精华国产精华液 | 欧美性猛交xxxx黑人交| 91精品国产综合久久香蕉麻豆| 精品成人佐山爱一区二区| 成人欧美一区二区三区| 日本少妇一区二区| 色综合天天综合给合国产| 欧美喷水一区二区| 精品久久久久99| 亚洲精品高清在线观看| 国内外成人在线视频| 欧美日韩一区二区三区四区| 国产视频视频一区| 日韩av一级片| 色婷婷久久一区二区三区麻豆| 日韩欧美一区二区久久婷婷| 亚洲精品国久久99热| 国产综合色在线| 91精品久久久久久久久99蜜臂 | 欧美在线视频你懂得| 久久久精品中文字幕麻豆发布| 亚洲高清免费一级二级三级| 国产成人免费在线视频| 91精品国产色综合久久不卡蜜臀| 亚洲美女一区二区三区| 成人av免费在线播放| 久久色在线视频| 久久99精品久久久久久国产越南| 欧美午夜寂寞影院| 一区二区在线观看av| av在线这里只有精品| 国产精品成人免费在线| 成人精品小蝌蚪| 中文欧美字幕免费| 国产91精品一区二区| 久久久九九九九| 粉嫩绯色av一区二区在线观看| 久久久久久久久久久久久夜| 黑人精品欧美一区二区蜜桃| ww亚洲ww在线观看国产| 精品无人码麻豆乱码1区2区 | 日韩一级免费观看| 日韩精品一二三| 制服.丝袜.亚洲.另类.中文| 亚洲电影在线播放| 欧美午夜理伦三级在线观看| 亚洲成人动漫在线观看| 337p亚洲精品色噜噜噜| 久久精品国产亚洲高清剧情介绍| 日韩一级二级三级| 精品一区二区久久久| 久久精品一区二区三区四区| 成人免费高清在线| 亚洲精选视频免费看| 日本韩国欧美三级| 五月开心婷婷久久| 久久久夜色精品亚洲| 成人小视频在线| 一区二区三区在线视频播放| 欧美日韩高清一区二区三区| 美女脱光内衣内裤视频久久影院| 久久久久久久久99精品| 99国产精品一区| 视频一区免费在线观看| 精品久久国产老人久久综合| 大陆成人av片| 亚洲国产欧美一区二区三区丁香婷| 91麻豆精品国产91久久久| 国产麻豆精品视频| 一区二区三区中文字幕精品精品| 欧美亚男人的天堂| 国产在线精品一区二区| 综合欧美亚洲日本| 日韩一区二区三区免费看| 成人av免费网站| 日韩av一二三| 亚洲欧洲av色图| 日韩免费电影网站| 99久久久久久| 久久超级碰视频| 一区二区三区成人| 国产亚洲欧洲997久久综合| 在线看国产一区| 国产成人综合在线观看| 视频在线在亚洲| 国产精品福利在线播放| 欧美成人video| 欧洲国内综合视频| 丁香婷婷综合激情五月色| 视频一区欧美精品| 亚洲一区二区三区四区的| 久久精品一区二区| 欧美成人伊人久久综合网| 91黄色小视频| 成人免费毛片片v| 国内精品久久久久影院薰衣草 | 老司机午夜精品| 亚洲一本大道在线| 亚洲欧美综合色| 久久久久国产精品免费免费搜索| 7777精品久久久大香线蕉| 在线观看国产日韩| 97久久精品人人爽人人爽蜜臀| 国产成人精品免费视频网站| 精品一区二区三区蜜桃| 日韩成人伦理电影在线观看| 亚洲一级二级在线| 亚洲蜜桃精久久久久久久| 国产精品久久久久天堂| 中文字幕免费不卡在线| 久久午夜国产精品| 337p粉嫩大胆色噜噜噜噜亚洲| 日韩一区二区三区在线观看| 欧美日韩国产免费一区二区| 欧美视频一区二区在线观看| 欧美亚洲动漫制服丝袜| 欧美色欧美亚洲另类二区| 91色在线porny| 在线看不卡av| 欧美精品色一区二区三区| 欧美视频中文字幕| 在线播放91灌醉迷j高跟美女| 欧美日韩一区视频| 日韩亚洲欧美一区二区三区| 日韩午夜av一区| 欧美精品一区二区三区在线播放 | 一区二区三区中文字幕精品精品 | 91精品国产免费久久综合| 欧美剧情电影在线观看完整版免费励志电影| 欧美最新大片在线看| 色久综合一二码| 欧美日韩精品久久久| 欧美久久一二三四区| 欧美tickling网站挠脚心| 久久人人爽人人爽| 亚洲丝袜精品丝袜在线| 一区二区免费看| 麻豆精品精品国产自在97香蕉| 国产一区视频在线看| 成人h动漫精品一区二| 欧美在线制服丝袜| 欧美成人高清电影在线| 亚洲欧美在线高清| 日日噜噜夜夜狠狠视频欧美人 | 91久久线看在观草草青青| 欧美日韩成人综合| 久久久久久久久岛国免费| 亚洲女性喷水在线观看一区| 日韩在线一二三区| 国产成人a级片| 欧美久久一区二区| 国产欧美日韩在线看| 亚洲国产日韩精品| 国产乱码精品一品二品| 一本一本大道香蕉久在线精品 | 色哟哟一区二区三区| 欧美一级视频精品观看| 国产亚洲婷婷免费| 五月天激情综合| 9人人澡人人爽人人精品| 欧美一区二区三区四区高清| 亚洲国产电影在线观看| 香蕉加勒比综合久久| 粉嫩在线一区二区三区视频| 欧美一区二区视频在线观看2022 |