1 /* 2 * Copyright 2012 smartics, Kronseder & Reiner GmbH 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 package test.de.smartics.ci.config.load; 17 18 import org.junit.Test; 19 import org.junit.experimental.categories.Category; 20 21 import de.smartics.ci.config.load.LocationManager; 22 import de.smartics.testdoc.annotations.Uut; 23 import de.smartics.testdoc.categories.type.Construction; 24 25 /** 26 * Tests construction of instances of {@link LocationManager}. 27 * 28 * <pre> 29 * {@example de.smartics.util.test.io.FileTestUtils.getFileFromRelativeResource(Project.class, "path/to/something");} 30 * </pre> 31 */ 32 @Category(Construction.class) 33 @Uut(type = LocationManager.class) 34 public class LocationManagerConstructionTest 35 { 36 // ********************************* Fields ********************************* 37 38 // --- constants ------------------------------------------------------------ 39 40 // --- members -------------------------------------------------------------- 41 42 // ****************************** Inner Classes ***************************** 43 44 // ********************************* Methods ******************************** 45 46 // --- prepare -------------------------------------------------------------- 47 48 // --- helper --------------------------------------------------------------- 49 50 // --- tests ---------------------------------------------------------------- 51 52 @Test 53 public void allowsConstructionWithoutParentClassLoader() 54 { 55 new LocationManager(); 56 } 57 58 @Test 59 public void allowsConstructionWithParentClassLoader() 60 { 61 new LocationManager(ClassLoader.getSystemClassLoader()); 62 } 63 64 @Test 65 public void allowsConstructionWithNullParentClassLoader() 66 { 67 new LocationManager(null); 68 } 69 }