diff options
Diffstat (limited to 'testplugins/org.eclipse.objectteams.otdt.tests/model/org/eclipse/objectteams/otdt/tests/otmodel/role/bound/toordinary/Test5a.java')
-rw-r--r-- | testplugins/org.eclipse.objectteams.otdt.tests/model/org/eclipse/objectteams/otdt/tests/otmodel/role/bound/toordinary/Test5a.java | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/testplugins/org.eclipse.objectteams.otdt.tests/model/org/eclipse/objectteams/otdt/tests/otmodel/role/bound/toordinary/Test5a.java b/testplugins/org.eclipse.objectteams.otdt.tests/model/org/eclipse/objectteams/otdt/tests/otmodel/role/bound/toordinary/Test5a.java index 9a659e272..bec741d81 100644 --- a/testplugins/org.eclipse.objectteams.otdt.tests/model/org/eclipse/objectteams/otdt/tests/otmodel/role/bound/toordinary/Test5a.java +++ b/testplugins/org.eclipse.objectteams.otdt.tests/model/org/eclipse/objectteams/otdt/tests/otmodel/role/bound/toordinary/Test5a.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 @@ -66,25 +66,25 @@ public class Test5a extends Test5_MethodMappingGeneral super.setUpSuite(); getTestSetting().setTeamClass("Team_5a"); } - + public void testMappingCalloutProperty() throws JavaModelException { assertNotNull(getTestSetting().getRoleJavaElement()); assertTrue(getTestSetting().getRoleJavaElement().exists()); - + IOTType roleOTElem = OTModelManager.getOTElement(getTestSetting().getRoleJavaElement()); assertNotNull(roleOTElem); assertTrue(roleOTElem instanceof IRoleType); - IRoleType roleRoleOTElem = (IRoleType) roleOTElem; + IRoleType roleRoleOTElem = (IRoleType) roleOTElem; IMethodMapping[] mappings = roleRoleOTElem.getMethodMappings(); assertTrue(mappings.length == 1); - + assertTrue(mappings[0].getMappingKind() == IOTJavaElement.CALLOUT_MAPPING); assertTrue(mappings[0] instanceof ICalloutMapping); } - - + + public void testMappingPropertyBoundBaseMethod() throws JavaModelException { // TODO(jwl): Resource access hardcoded here! @@ -93,31 +93,31 @@ public class Test5a extends Test5_MethodMappingGeneral "boundtoordinary", "boundtoordinary.basepkg", "SampleBase.java"); - + IType baseJavaElem = baseUnit.getType("SampleBase"); assertNotNull(baseJavaElem); assertTrue(baseJavaElem.exists()); - + IMethod baseMethod = baseJavaElem.getMethod(getBaseMethodName(), new String[0]); assertNotNull(baseMethod); assertTrue(baseMethod.exists()); - + assertNotNull(getTestSetting().getRoleJavaElement()); assertTrue(getTestSetting().getRoleJavaElement().exists()); - + IOTType roleOTElem = OTModelManager.getOTElement(getTestSetting().getRoleJavaElement()); assertNotNull(roleOTElem); assertTrue(roleOTElem instanceof IRoleType); IRoleType roleRoleOTElem = (IRoleType) roleOTElem; - + IMethodMapping[] mappings = roleRoleOTElem.getMethodMappings(); assertTrue(mappings.length == 1); assertTrue(mappings[0] instanceof ICalloutMapping); - + ICalloutMapping calloutMapping = (ICalloutMapping) mappings[0]; assertNotNull(calloutMapping); IMethod boundBaseMethod = calloutMapping.getBoundBaseMethod(); - + assertEquals(boundBaseMethod, baseMethod); } } |