diff options
Diffstat (limited to 'testplugins/org.eclipse.objectteams.otdt.tests/hierarchy/org/eclipse/objectteams/otdt/tests/superhierarchy/OTSuperTypeHierarchyTest007.java')
-rw-r--r-- | testplugins/org.eclipse.objectteams.otdt.tests/hierarchy/org/eclipse/objectteams/otdt/tests/superhierarchy/OTSuperTypeHierarchyTest007.java | 140 |
1 files changed, 70 insertions, 70 deletions
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/hierarchy/org/eclipse/objectteams/otdt/tests/superhierarchy/OTSuperTypeHierarchyTest007.java b/testplugins/org.eclipse.objectteams.otdt.tests/hierarchy/org/eclipse/objectteams/otdt/tests/superhierarchy/OTSuperTypeHierarchyTest007.java index 01be3efc1..ab068ef31 100644 --- a/testplugins/org.eclipse.objectteams.otdt.tests/hierarchy/org/eclipse/objectteams/otdt/tests/superhierarchy/OTSuperTypeHierarchyTest007.java +++ b/testplugins/org.eclipse.objectteams.otdt.tests/hierarchy/org/eclipse/objectteams/otdt/tests/superhierarchy/OTSuperTypeHierarchyTest007.java @@ -1,20 +1,20 @@ /********************************************************************** * This file is part of "Object Teams Development Tooling"-Software - * + * * Copyright 2004, 2010 Fraunhofer Gesellschaft, Munich, Germany, * for its Fraunhofer Institute and Computer Architecture and Software * Technology (FIRST), Berlin, Germany and Technical University Berlin, * Germany. - * + * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 - * + * * Please visit http://www.eclipse.org/objectteams for updates and contact. - * + * * Contributors: * Fraunhofer FIRST - Initial API and implementation * Technical University Berlin - Initial API and implementation @@ -36,27 +36,27 @@ public class OTSuperTypeHierarchyTest007 extends FileBasedHierarchyTest { private IType _T1; private IType _T2; - + private IType _T1_R1; private IType _T1_R2; - + private IType _T2_R1; private IType _T2_R2; - + private IType _classA; private IType _classB; - + private IType _interfaceA; private IType _interfaceB; private IType _interfaceC; - + private IType _objectType; - + public OTSuperTypeHierarchyTest007(String name) { super(name); } - + public static Test suite() { if (true) @@ -64,28 +64,28 @@ public class OTSuperTypeHierarchyTest007 extends FileBasedHierarchyTest return new Suite(OTSuperTypeHierarchyTest007.class); } @SuppressWarnings("unused") - junit.framework.TestSuite suite = + junit.framework.TestSuite suite = new Suite(OTSuperTypeHierarchyTest007.class.getName()); return suite; } - + public void setUpSuite() throws Exception { setTestProjectDir("Hierarchy"); super.setUpSuite(); - + String srcFolder = "src"; String pkg = "test007"; - + _T1 = getType(getTestProjectDir(), srcFolder, pkg, "T1"); _T2 = getType(getTestProjectDir(), srcFolder, pkg, "T2"); - + _T1_R1 = getRole(_T1, "T1.R1"); _T1_R2 = getRole(_T1, "T1.R2"); - + _T2_R1 = getRole(_T2, "T2.R1"); _T2_R2 = getRole(_T2, "T2.R2"); - + _classA = getType(getTestProjectDir(), srcFolder, pkg, "ClassA"); _classB = @@ -99,8 +99,8 @@ public class OTSuperTypeHierarchyTest007 extends FileBasedHierarchyTest _objectType = getType(getTestProjectDir(), "rt.jar", "java.lang", "Object"); } - - + + public void testCreation() { assertCreation(_T1); @@ -112,7 +112,7 @@ public class OTSuperTypeHierarchyTest007 extends FileBasedHierarchyTest assertCreation(_T2_R1); assertCreation(_T2_R2); } - + public void testGetAllSuperclassesFor_T2R1() throws JavaModelException { _focusType = _T2_R1; @@ -123,8 +123,8 @@ public class OTSuperTypeHierarchyTest007 extends FileBasedHierarchyTest _classA, _T1_R1 }; IType [] actual = _testObj.getAllSuperclasses(_focusType); - - assertEquals(expected.length, actual.length); + + assertEquals(expected.length, actual.length); assertTrue(compareTypes(expected, actual)); } @@ -132,63 +132,63 @@ public class OTSuperTypeHierarchyTest007 extends FileBasedHierarchyTest { _focusType = _T2_R2; _testObj = createSuperTypeHierarchy(_focusType); - - IType[] expected = new IType[] { _objectType, _T1_R2 }; + + IType[] expected = new IType[] { _objectType, _T1_R2 }; IType [] actual = _testObj.getAllSuperclasses(_focusType); - assertEquals(expected.length, actual.length); + assertEquals(expected.length, actual.length); assertTrue(compareTypes(expected, actual)); } - - + + public void testGetAllSuperInterfacesFor_T2R2() throws JavaModelException { _focusType = _T2_R2; _testObj = createSuperTypeHierarchy(_focusType); - + IType[] expected = new IType[] { _interfaceA, _interfaceB, - _interfaceC }; + _interfaceC }; IType [] actual = _testObj.getAllSuperInterfaces(_focusType); - - assertEquals(expected.length, actual.length); + + assertEquals(expected.length, actual.length); assertTrue(compareTypes(expected, actual)); } - + public void testGetSuperInterfaces_T1R2() throws JavaModelException { _focusType = _T1_R2; _testObj = createSuperTypeHierarchy(_focusType); - + IType[] expected = new IType[] { _interfaceA }; IType [] actual = _testObj.getSuperInterfaces(_focusType); - - assertEquals(expected.length, actual.length); + + assertEquals(expected.length, actual.length); assertTrue(compareTypes(expected, actual)); } - + public void testGetAllSuperclassesFor_interfaceB() throws JavaModelException { _focusType = _interfaceB; _testObj = createSuperTypeHierarchy(_focusType); - - IType[] expected = new IType[0]; + + IType[] expected = new IType[0]; IType [] actual = _testObj.getAllSuperclasses(_focusType); - - assertEquals(expected.length, actual.length); + + assertEquals(expected.length, actual.length); assertTrue(compareTypes(expected, actual)); } - + public void testGetAllSuperInterfacesFor_interfaceB() throws JavaModelException { _focusType = _interfaceB; - _testObj = createSuperTypeHierarchy(_focusType); + _testObj = createSuperTypeHierarchy(_focusType); - IType[] expected = new IType[] { _interfaceA }; + IType[] expected = new IType[] { _interfaceA }; IType [] actual = _testObj.getAllSuperInterfaces(_focusType); - - assertEquals(expected.length, actual.length); + + assertEquals(expected.length, actual.length); assertTrue(compareTypes(expected, actual)); } @@ -196,50 +196,50 @@ public class OTSuperTypeHierarchyTest007 extends FileBasedHierarchyTest { _focusType = _classA; _testObj = createSuperTypeHierarchy(_focusType); - + IType[] expected = new IType[0]; IType [] actual = _testObj.getAllSuperInterfaces(_focusType); - - assertEquals(expected.length, actual.length); + + assertEquals(expected.length, actual.length); assertTrue(compareTypes(expected, actual)); } - + public void testGetSuperInterfaces_interfaceB_In_T2R2() throws JavaModelException { _focusType = _T2_R2; _testObj = createSuperTypeHierarchy(_focusType); - - IType[] expected = new IType[] { _interfaceA }; + + IType[] expected = new IType[] { _interfaceA }; IType [] actual = _testObj.getSuperInterfaces(_interfaceB); - - assertEquals(expected.length, actual.length); + + assertEquals(expected.length, actual.length); assertTrue(compareTypes(expected, actual)); } - + public void testGetAllSuperclassesFor_classB() throws JavaModelException { _focusType = _classB; _testObj = createSuperTypeHierarchy(_focusType); - + IType[] expected = new IType[] { _objectType, - _classA }; + _classA }; IType [] actual = _testObj.getAllSuperclasses(_focusType); - - assertEquals(expected.length, actual.length); + + assertEquals(expected.length, actual.length); assertTrue(compareTypes(expected, actual)); } - + public void testGetExplicitSuperclassFor_classB() throws JavaModelException { _focusType = _classB; - _testObj = createSuperTypeHierarchy(_focusType); + _testObj = createSuperTypeHierarchy(_focusType); - IType expected = _classA; + IType expected = _classA; IType actual = OTTypeHierarchies.getInstance().getExplicitSuperclass(_testObj, _focusType); assertTrue(compareTypes(expected, actual)); } - + public void testGetAllInterfaces_T2R2() throws JavaModelException { _focusType = _T2_R2; @@ -250,24 +250,24 @@ public class OTSuperTypeHierarchyTest007 extends FileBasedHierarchyTest _interfaceB, _interfaceC }; IType [] actual = _testObj.getAllInterfaces(); - - assertEquals(expected.length, actual.length); + + assertEquals(expected.length, actual.length); assertTrue(compareTypes(expected, actual)); } public void testGetImplementingClasses_interfaceA_in_T2R2() throws JavaModelException { _focusType = _T2_R2; - _testObj = createSuperTypeHierarchy(_focusType); + _testObj = createSuperTypeHierarchy(_focusType); IType[] expected = new IType[] { _T1_R2, // _T2_R2 // not a direct implementor - }; + }; IType [] actual = _testObj.getImplementingClasses(_interfaceA); - - assertEquals(expected.length, actual.length); + + assertEquals(expected.length, actual.length); assertTrue(compareTypes(expected, actual)); } - + } |