diff options
Diffstat (limited to 'policy-utils/src/test/java/org/onap/policy/drools/utils/ReflectionUtilTest.java')
-rw-r--r-- | policy-utils/src/test/java/org/onap/policy/drools/utils/ReflectionUtilTest.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/policy-utils/src/test/java/org/onap/policy/drools/utils/ReflectionUtilTest.java b/policy-utils/src/test/java/org/onap/policy/drools/utils/ReflectionUtilTest.java index efcef272..b7feaf06 100644 --- a/policy-utils/src/test/java/org/onap/policy/drools/utils/ReflectionUtilTest.java +++ b/policy-utils/src/test/java/org/onap/policy/drools/utils/ReflectionUtilTest.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -29,38 +29,38 @@ import static org.junit.Assert.fail; import org.junit.Test; public class ReflectionUtilTest { - + public class ParentClass { } - + public class ChildClass extends ParentClass{ } @Test public void testReflection() { - + try { Class<?> class1 = Class.forName("org.onap.policy.drools.utils.ReflectionUtil"); - + ClassLoader classLoader = class1.getClassLoader(); - + Class<?> class2 = ReflectionUtil.fetchClass(classLoader, "org.onap.policy.drools.utils.ReflectionUtil"); - - + + assertTrue(ReflectionUtil.isClass(classLoader, "org.onap.policy.drools.utils.ReflectionUtil")); - assertEquals(class1,class2); + assertEquals(class1, class2); assertTrue(ReflectionUtil.isSubclass(ParentClass.class, ChildClass.class)); assertFalse(ReflectionUtil.isSubclass(ChildClass.class, ParentClass.class)); - - + + } catch (ClassNotFoundException e) { fail(); } } - + @Test(expected = IllegalArgumentException.class) public void testException1() { ReflectionUtil.fetchClass(null, "org.onap.policy.drools.utils.ReflectionUtil"); |