1 /*
2 * This file is part of dependency-check-maven.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * Copyright (c) 2014 Jeremy Long. All Rights Reserved.
17 */
18 package org.owasp.dependencycheck.maven;
19
20 import java.io.InputStream;
21 import org.junit.AfterClass;
22 import org.junit.BeforeClass;
23 import org.owasp.dependencycheck.utils.Settings;
24
25 /**
26 *
27 * @author Jeremy Long
28 */
29 public class BaseTest {
30
31 /**
32 * The properties file location.
33 */
34 public static final String PROPERTIES_FILE = "mojo.properties";
35
36 @BeforeClass
37 public static void setUpClass() throws Exception {
38 Settings.initialize();
39 InputStream mojoProperties = BaseTest.class.getClassLoader().getResourceAsStream(BaseTest.PROPERTIES_FILE);
40 Settings.mergeProperties(mojoProperties);
41 }
42
43 @AfterClass
44 public static void tearDownClass() throws Exception {
45 Settings.cleanup(true);
46 }
47 }