--- /dev/null
+# SALOMELocalTrace : log on local machine
+#
+# Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+#
+# 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.
+#
+# 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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+#
+#
+#
+# File : Makefile.in
+# Author : Sergey RUIN
+# Module : SALOME
+
+top_srcdir=@top_srcdir@
+top_builddir=../../..
+srcdir=@srcdir@
+VPATH=.:@srcdir@:@top_srcdir@/idl
+
+
+@COMMENCE@
+
+# header files
+EXPORT_HEADERS= SALOMEDSImplTest.hxx
+
+EXPORT_PYSCRIPTS = TestSALOMEDSImpl.py
+
+# Libraries targets
+
+LIB = libSALOMEDSImplTest.la
+LIB_SRC = SALOMEDSImplTest.cxx
+
+# Executables targets
+
+BIN = TestSALOMEDSImpl
+BIN_SRC =
+
+CXXFLAGS += $(OCC_CXXFLAGS) @CPPUNIT_INCLUDES@
+CPPFLAGS += $(OCC_INCLUDES) @CPPUNIT_INCLUDES@
+
+LIBS= @LIBS@ @CPPUNIT_LIBS@
+
+LDFLAGS+=$(CAS_OCAF)
+
+LDFLAGSFORBIN+= -L$(KERNEL_ROOT_DIR)/lib/salome -lSalomeDSImpl $(LDFLAGS) -lSALOMEDSImplTest
+
+UNIT_TEST_PROG = TestSALOMEDSImpl
+
+@CONCLUDE@
--- /dev/null
+// Copyright (C) 2006 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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.
+//
+// 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/
+//
+
+#include "SALOMEDSImplTest.hxx"
+
+#include <iostream>
+#include <fstream>
+#include <string>
+#include <vector>
+#include <cstdlib>
+#include "utilities.h"
+
+#include "SALOMEDSImpl_AttributeParameter.hxx"
+#include "SALOMEDSImpl_StudyManager.hxx"
+#include "SALOMEDSImpl_Study.hxx"
+#include "SALOMEDSImpl_StudyBuilder.hxx"
+#include "SALOMEDSImpl_GenericAttribute.hxx"
+
+#include <TCollection_AsciiString.hxx>
+
+using namespace std;
+
+// ============================================================================
+/*!
+ * Set up the environment
+ */
+// ============================================================================
+
+void SALOMEDSImplTest::setUp()
+{
+ TCollection_AsciiString kernel(getenv("KERNEL_ROOT_DIR"));
+ TCollection_AsciiString subPath("/share/salome/resources");
+ TCollection_AsciiString csf_var = (kernel+subPath);
+ setenv("CSF_PluginDefaults", csf_var.ToCString(), 0);
+ setenv("CSF_SALOMEDS_ResourcesDefaults", csf_var.ToCString(), 0);
+}
+
+// ============================================================================
+/*!
+ * - delete trace classes
+ */
+// ============================================================================
+
+void
+SALOMEDSImplTest::tearDown()
+{
+}
+
+// ============================================================================
+/*!
+ * Check setting int value
+ */
+// ============================================================================
+void SALOMEDSImplTest::testAttributeParameter()
+{
+ Handle(SALOMEDSImpl_StudyManager) sm = new SALOMEDSImpl_StudyManager();
+ Handle(SALOMEDSImpl_Study) study = sm->NewStudy("Test");
+ Handle(SALOMEDSImpl_AttributeParameter) _ap = study->GetCommonParameters("TestComp", 0);
+
+ CPPUNIT_ASSERT(!_ap.IsNull());
+
+ _ap->SetInt("IntValue", 1);
+ CPPUNIT_ASSERT(_ap->IsSet("IntValue", PT_INTEGER));
+ CPPUNIT_ASSERT(_ap->GetInt("IntValue") == 1);
+
+ _ap->SetReal("RealValue", 1.2);
+ CPPUNIT_ASSERT(_ap->IsSet("RealValue", PT_REAL));
+ CPPUNIT_ASSERT(_ap->GetReal("RealValue") == 1.2);
+
+ _ap->SetString("StringValue", "hello");
+ CPPUNIT_ASSERT(_ap->IsSet("StringValue", PT_STRING));
+ CPPUNIT_ASSERT(_ap->GetString("StringValue") == "hello");
+
+ _ap->SetBool("BoolValue", 0);
+ CPPUNIT_ASSERT(_ap->IsSet("BoolValue", PT_BOOLEAN));
+ CPPUNIT_ASSERT(!_ap->GetBool("BoolValue"));
+
+ _ap->SetBool("BoolValue", 0);
+ CPPUNIT_ASSERT(_ap->IsSet("BoolValue", PT_BOOLEAN));
+ CPPUNIT_ASSERT(!_ap->GetBool("BoolValue"));
+
+ vector<int> intArray;
+ intArray.push_back(0);
+ intArray.push_back(1);
+
+ _ap->SetIntArray("IntArray", intArray);
+ CPPUNIT_ASSERT(_ap->IsSet("IntArray", PT_INTARRAY));
+ CPPUNIT_ASSERT(_ap->GetIntArray("IntArray")[0] == 0);
+ CPPUNIT_ASSERT(_ap->GetIntArray("IntArray")[1] == 1);
+
+ vector<double> realArray;
+ realArray.push_back(0.0);
+ realArray.push_back(1.1);
+
+ _ap->SetRealArray("RealArray", realArray);
+ CPPUNIT_ASSERT(_ap->IsSet("RealArray", PT_REALARRAY));
+ CPPUNIT_ASSERT(_ap->GetRealArray("RealArray")[0] == 0.0);
+ CPPUNIT_ASSERT(_ap->GetRealArray("RealArray")[1] == 1.1);
+
+ vector<string> strArray;
+ strArray.push_back("hello");
+ strArray.push_back("world");
+
+ _ap->SetStrArray("StrArray", strArray);
+ CPPUNIT_ASSERT(_ap->IsSet("StrArray", PT_STRARRAY));
+ CPPUNIT_ASSERT(_ap->GetStrArray("StrArray")[0] == "hello");
+ CPPUNIT_ASSERT(_ap->GetStrArray("StrArray")[1] == "world");
+
+}
+
+
+
--- /dev/null
+// Copyright (C) 2006 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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.
+//
+// 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/
+//
+
+#ifndef _SALOMEDSImplTEST_HXX_
+#define _SALOMEDSImplTEST_HXX_
+
+#include <cppunit/extensions/HelperMacros.h>
+
+class SALOMEDSImplTest : public CppUnit::TestFixture
+{
+ CPPUNIT_TEST_SUITE( SALOMEDSImplTest );
+ CPPUNIT_TEST( testAttributeParameter );
+ CPPUNIT_TEST_SUITE_END();
+
+public:
+
+ void setUp();
+ void tearDown();
+ void testAttributeParameter();
+};
+
+#endif
--- /dev/null
+// Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// 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.
+//
+// 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/
+//
+
+// --- include all SALOMEDSImpl Test from basics until the present directory
+
+#include "SALOMEDSImplTest.hxx"
+
+// --- Registers the fixture into the 'registry'
+
+CPPUNIT_TEST_SUITE_REGISTRATION( SALOMEDSImplTest );
+
+// --- generic Main program from Basic/Test
+
+#include "BasicMainTest.hxx"
--- /dev/null
+
+import sys, os,signal,string,commands
+import runSalome
+import orbmodule
+import TestKiller
+
+# get SALOME environment :
+
+args, modules_list, modules_root_dir = runSalome.get_config()
+runSalome.set_env(args, modules_list, modules_root_dir)
+
+# launch CORBA naming server
+
+clt=orbmodule.client()
+
+# launch CORBA logger server
+
+myServer=runSalome.LoggerServer(args)
+myServer.run()
+clt.waitLogger("Logger")
+
+# execute Unit Test
+
+command = ['TestSALOMEDSImpl']
+ret = os.spawnvp(os.P_WAIT, command[0], command)
+
+# kill Test process
+
+TestKiller.killProcess(runSalome.process_id)