1 /*
2 * #%L
3 * IsisFish
4 *
5 * $Id: ResultInfoHelperTest.java 4271 2015-06-17 13:53:01Z echatellier $
6 * $HeadURL: https://svn.codelutin.com/isis-fish/tags/isis-fish-4.4.0.2/src/test/java/fr/ifremer/isisfish/result/ResultInfoHelperTest.java $
7 * %%
8 * Copyright (C) 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 package fr.ifremer.isisfish.result;
26
27 import java.util.Collections;
28 import java.util.Set;
29
30 import org.junit.Assert;
31 import org.junit.Test;
32
33 import fr.ifremer.isisfish.AbstractIsisFishTest;
34 import fr.ifremer.isisfish.IsisFishException;
35
36 public class ResultInfoHelperTest extends AbstractIsisFishTest {
37
38 /**
39 * Test qu'à partir d'un result, on arrive bien recursivement à en extraire les resultats
40 * dépendant et sans boucle infinie.
41 *
42 * @throws IsisFishException
43 */
44 @Test
45 public void testResultRecursiveExtract() throws IsisFishException {
46 Set<String> necessaryResults = Collections.singleton("MatrixTestDep1");
47 Set<String> allNecessaryResult = ResultInfoHelper.extractAllNecessaryResults(necessaryResults);
48
49 Assert.assertEquals(3, allNecessaryResult.size()); //MatrixTestDep1, MatrixTestDep2, MatrixTestDep3
50 }
51
52 }