From: azv Date: Wed, 5 Dec 2018 11:37:33 +0000 (+0300) Subject: [Code coverage ParametersPlugin]: Unit test for ParametersMgr X-Git-Tag: End2018~115 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=64466af71164ac8e282c3474716fabe48706dc34;p=modules%2Fshaper.git [Code coverage ParametersPlugin]: Unit test for ParametersMgr --- diff --git a/src/ParametersPlugin/CMakeLists.txt b/src/ParametersPlugin/CMakeLists.txt index 8cc950e41..07d2bf0b8 100644 --- a/src/ParametersPlugin/CMakeLists.txt +++ b/src/ParametersPlugin/CMakeLists.txt @@ -116,6 +116,7 @@ INSTALL(FILES ${QM_RESOURCES} DESTINATION ${SHAPER_INSTALL_QM_RESOURCES}) ADD_UNIT_TESTS(TestParameterCreation.py TestParameterRename.py TestParameterChangeValue.py + TestParametersMgr.py Test1806.py Test2392.py Test2474.py diff --git a/src/ParametersPlugin/Test/TestParametersMgr.py b/src/ParametersPlugin/Test/TestParametersMgr.py new file mode 100644 index 000000000..847727169 --- /dev/null +++ b/src/ParametersPlugin/Test/TestParametersMgr.py @@ -0,0 +1,42 @@ +## Copyright (C) 2018-20xx CEA/DEN, EDF R&D +## +## This library is free software; you can redistribute it and/or +## modify it under the terms of the GNU Lesser General Public +## License as published by the Free Software Foundation; either +## version 2.1 of the License, or (at your option) any later version. +## +## This library is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## Lesser General Public License for more details. +## +## You should have received a copy of the GNU Lesser General Public +## License along with this library; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +## See http:##www.salome-platform.org/ or +## email : webmaster.salome@opencascade.com +## + +""" + TestParametersMgr.py + + class ParametersPlugin_ParametersMgr +""" + +#========================================================================= +# Initialization of the test +#========================================================================= +from ModelAPI import * + +__updated__ = "2018-12-05" + +aSession = ModelAPI_Session.get() +aDocument = aSession.moduleDocument() + +aSession.startOperation() +aKind = "ParametersMgr" +aParamMgr = aDocument.addFeature(aKind) +assert(aParamMgr is not None) +assert(aParamMgr.getKind() == aKind) +aSession.finishOperation()