From 419dd334d482284f4d82d426337c2ccd423b7e2c Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Thu, 19 Sep 2024 21:25:10 +0200 Subject: [PATCH] Revert "Reapply "Add id test and util"" This reverts commit 595300de6c8a535daab4ced96c0c3d5761eacc0d. --- .../AutoSARtoSimuLinkSwComponentTest.xtend | 10 ---------- .../SimuLinkToAutoSARBlockTest.xtend | 10 ---------- .../tests/util/AutoSARQueryUtil.xtend | 7 ------- ...LinkAutoSARClassifierEqualityValidation.xtend | 16 ---------------- .../tests/util/SimuLinkQueryUtil.xtend | 7 ------- 5 files changed, 50 deletions(-) diff --git a/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/autosar2simulink/AutoSARtoSimuLinkSwComponentTest.xtend b/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/autosar2simulink/AutoSARtoSimuLinkSwComponentTest.xtend index 89f24ec..e85764f 100644 --- a/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/autosar2simulink/AutoSARtoSimuLinkSwComponentTest.xtend +++ b/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/autosar2simulink/AutoSARtoSimuLinkSwComponentTest.xtend @@ -86,16 +86,6 @@ class AutoSARtoSimuLinkSwComponentTest extends AbstractAutoSARToSimuLinkTest { assertNoElementWithNameInRootModel(DEFAULT_Component_NAME) } - - @Test - def void testChangeId() { - createCompositeSWComponentInModel(DEFAULT_COMPOSITE_COMPONENT_NAME) - changeAutoSARView [ - val component = claimAutoSARElement(CompositeSwComponent, DEFAULT_COMPOSITE_COMPONENT_NAME) as CompositeSwComponent - component.id = "newId" - ] - assertCompositeSwComponentWithIdInRootModel("newId") - } } \ No newline at end of file diff --git a/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/simulink2autosar/SimuLinkToAutoSARBlockTest.xtend b/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/simulink2autosar/SimuLinkToAutoSARBlockTest.xtend index 1986609..f58e92a 100644 --- a/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/simulink2autosar/SimuLinkToAutoSARBlockTest.xtend +++ b/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/simulink2autosar/SimuLinkToAutoSARBlockTest.xtend @@ -74,15 +74,5 @@ class SimuLinkToAutoSARBlockTest extends AbstractSimuLinkToAutoSARTest { } - @Test - def void testChangeId() { - createSubsystemInModel(DEFAUL_SUBSYSTEM_NAME) - changeSimuLinkView [ - val subSystem = claimSimuLinkBlock(DEFAUL_SUBSYSTEM_NAME) - subSystem.id = "newId" - ] - assertCompositeSwComponentWithIdInRootModel("newId") - } - } \ No newline at end of file diff --git a/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/util/AutoSARQueryUtil.xtend b/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/util/AutoSARQueryUtil.xtend index c5edece..00d5ded 100644 --- a/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/util/AutoSARQueryUtil.xtend +++ b/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/util/AutoSARQueryUtil.xtend @@ -35,13 +35,6 @@ class AutoSARQueryUtil { ].claimOne } - static def SwComponent claimAutoSARElementById(View view, Class element, - String elementId) { - view.getRootObjects(AutoSARModel).map[swcomponent].flatten.filter[ - it.id == elementId - ].claimOne - } - static def CompositeSwComponent claimAutoSARCompositeSwComponent(View view, Class element, String elementName) { diff --git a/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/util/SimuLinkAutoSARClassifierEqualityValidation.xtend b/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/util/SimuLinkAutoSARClassifierEqualityValidation.xtend index 0fe1931..1da2692 100644 --- a/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/util/SimuLinkAutoSARClassifierEqualityValidation.xtend +++ b/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/util/SimuLinkAutoSARClassifierEqualityValidation.xtend @@ -59,10 +59,6 @@ class SimuLinkAutoSARClassifierEqualityValidation { assertElementWithName(SubSystem, CompositeSwComponent, compositeComponentName) } - def assertCompositeSwComponentWithIdInRootModel(String compositeComponentId){ - assertElementWithId(SubSystem, CompositeSwComponent, compositeComponentId) - } - /* @@ -118,18 +114,6 @@ class SimuLinkAutoSARClassifierEqualityValidation { ] } - private def void assertElementWithId( - Class simulinkElement, - Class autoSARElement, - String id) { - viewExecutor.apply [ - val SimulinkElement = claimSimuLinkElementById(simulinkElement, id) - - val AutoSARElement = claimAutoSARElementById(autoSARElement, id) - assertElementEquals(SimulinkElement , AutoSARElement ) - ] - } - def static dispatch void assertElementEquals(Block block, AtomicSwComponent component){ assertSimuLinkBlockEqualsAutoSARSwComponent(block,component) diff --git a/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/util/SimuLinkQueryUtil.xtend b/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/util/SimuLinkQueryUtil.xtend index 36e0a09..42580c6 100644 --- a/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/util/SimuLinkQueryUtil.xtend +++ b/tests/tools.vitruv.applications.simulinkautosar.tests/src/tools/vitruv/applications/simulinkautosar/tests/util/SimuLinkQueryUtil.xtend @@ -57,13 +57,6 @@ class SimuLinkQueryUtil { ].claimOne } - static def Block claimSimuLinkElementById(View view, Class simuLinkType, - String elementId) { - getBlocksOfModel(view,elementId).filter[ - it.id == elementId - ].claimOne - } - static def claimSimuLinkBlockOfSubsystem(SubSystem subsystem, String blockname){ subsystem.subBlocks.filter[it.name == blockname].claimOne