1 /* 2 * #%L 3 * IsisFish 4 * 5 * $Id: DataStorageTestHelper.java 4277 2015-06-21 17:24:03Z echatellier $ 6 * $HeadURL: https://svn.codelutin.com/isis-fish/tags/isis-fish-4.4.0.2/src/test/java/fr/ifremer/isisfish/datastore/DataStorageTestHelper.java $ 7 * %% 8 * Copyright (C) 2009 - 2015 Ifremer, CodeLutin, Chatellier Eric 9 * %% 10 * This program is free software: you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License as 12 * published by the Free Software Foundation, either version 3 of the 13 * License, or (at your option) any later version. 14 * 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU General Public License for more details. 19 * 20 * You should have received a copy of the GNU General Public 21 * License along with this program. If not, see 22 * <http://www.gnu.org/licenses/gpl-3.0.html>. 23 * #L% 24 */ 25 26 package fr.ifremer.isisfish.datastore; 27 28 /** 29 * Helper to acces protected static cache objects. 30 * 31 * @author chatellier 32 * @version $Revision: 4277 $ 33 * 34 * Last update : $Date: 2015-06-21 19:24:03 +0200 (Sun, 21 Jun 2015) $ 35 * By : $Author: echatellier $ 36 */ 37 public class DataStorageTestHelper { 38 39 /** 40 * Clear all static cache. 41 * 42 * Sans vider le cache certains test peuvent planter lors de l'execution de multiples test seulement. 43 */ 44 public static void clearAllCache() { 45 ObjectiveStorage.objectiveCache.clear(); 46 OptimizationStorage.objectiveCache.clear(); 47 RegionStorage.regions.clear(); 48 RuleStorage.rulesCache.clear(); 49 ResultInfoStorage.resultInfosCache.clear(); 50 ScriptStorage.scriptsCache.clear(); 51 SensitivityAnalysisStorage.sensitivityCache.clear(); 52 SimulationPlanStorage.plansCache.clear(); 53 SimulationStorage.simulations.clear(); 54 SimulatorStorage.simulatorsCache.clear(); 55 } 56 }