View Javadoc

    1   /*
    2    * This file is part of dependency-check-core.
    3    *
    4    * Dependency-check-core is free software: you can redistribute it and/or modify it
    5    * under the terms of the GNU General Public License as published by the Free
    6    * Software Foundation, either version 3 of the License, or (at your option) any
    7    * later version.
    8    *
    9    * Dependency-check-core is distributed in the hope that it will be useful, but
    10   * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    11   * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
    12   * details.
    13   *
    14   * You should have received a copy of the GNU General Public License along with
    15   * dependency-check-core. If not, see http://www.gnu.org/licenses/.
    16   *
    17   * Copyright (c) 2012 Jeremy Long. All Rights Reserved.
    18   */
    19  package org.owasp.dependencycheck.analyzer;
    20
    21  import org.owasp.dependencycheck.analyzer.AbstractAnalyzer;
    22  import java.util.Set;
    23  import org.junit.After;
    24  import org.junit.AfterClass;
    25  import org.junit.Before;
    26  import org.junit.BeforeClass;
    27  import org.junit.Test;
    28  import static org.junit.Assert.*;
    29
    30  /**
    31   *
    32   * @author Jeremy Long (jeremy.long@owasp.org)
    33   */
    34  public class AbstractAnalyzerTest {
    35
    36      public AbstractAnalyzerTest() {
    37      }
    38
    39      @BeforeClass
    40      public static void setUpClass() throws Exception {
    41      }
    42
    43      @AfterClass
    44      public static void tearDownClass() throws Exception {
    45      }
    46
    47      @Before
    48      public void setUp() {
    49      }
    50
    51      @After
    52      public void tearDown() {
    53      }
    54
    55      /**
    56       * Test of newHashSet method, of class AbstractAnalyzer.
    57       */
    58      @Test
    59      public void testNewHashSet() {
    60          Set result = AbstractAnalyzer.newHashSet("one", "two");
    61          assertEquals(2, result.size());
    62          assertTrue(result.contains("one"));
    63          assertTrue(result.contains("two"));
    64      }
    65  }