Salome HOME
Merge remote-tracking branch 'origin/V8_0_0_BR'
[modules/med.git] / src / MEDCouplingCorba_Swig / TestMEDCouplingCorbaClt.py
index 549ce453cdd2ce9f069ddcea7e2469ad14c0876f..89c2f9bf1c3a2e6ec7e5847f67c228d2295535f4 100644 (file)
@@ -1,9 +1,9 @@
-# Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2015  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.
+# 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
@@ -34,8 +34,9 @@ class MEDCouplingCorbaServBasicsTestClt(unittest.TestCase):
     def testContentOfFetched1DMesh(self):
         meshPtr=self._objC.get1DMesh();
         self.assertEqual("1DMeshForCorba",meshPtr.getName());
-        _mesh_from_distant=MEDCouplingUMeshClient.New(meshPtr);
+        _mesh_from_distant=MEDCouplingMeshClient.New(meshPtr);
         meshPtr.UnRegister();
+        self.assertTrue(isinstance(_mesh_from_distant,MEDCouplingUMesh))
         self.assertTrue(_mesh_from_distant.getSpaceDimension()==3);
         self.assertTrue(_mesh_from_distant.getMeshDimension()==1);
         test=MEDCouplingCorbaSwigTest.MEDCouplingCorbaServBasicsTest()
@@ -134,6 +135,42 @@ class MEDCouplingCorbaServBasicsTestClt(unittest.TestCase):
         meshRef=test.buildCMesh();
         self.assertTrue(_mesh_from_distant.isEqual(meshRef,1e-12))
         pass
+
+    def testCorbaFetchingIMesh(self):
+        meshPtr=self._objC.getIMesh();
+        _mesh_from_distant=MEDCouplingIMeshClient.New(meshPtr);
+        meshPtr.UnRegister();
+        test=MEDCouplingCorbaSwigTest.MEDCouplingCorbaServBasicsTest()
+        meshRef=test.buildIMesh();
+        self.assertTrue(_mesh_from_distant.isEqual(meshRef,1e-12))
+        pass
+
+    def testCorbaFetchingCLMesh(self):
+        meshPtr=self._objC.getCLMesh();
+        _mesh_from_distant=MEDCouplingCurveLinearMeshClient.New(meshPtr);
+        meshPtr.UnRegister();
+        test=MEDCouplingCorbaSwigTest.MEDCouplingCorbaServBasicsTest()
+        meshRef=test.buildCLMesh();
+        self.assertTrue(_mesh_from_distant.isEqual(meshRef,1e-12))
+        pass
+
+    def testCorbaFetching1SGTUMesh(self):
+        meshPtr=self._objC.get1SGTUMesh();
+        _mesh_from_distant=MEDCoupling1SGTUMeshClient.New(meshPtr);
+        meshPtr.UnRegister();
+        test=MEDCouplingCorbaSwigTest.MEDCouplingCorbaServBasicsTest()
+        meshRef=test.build1SGTUMesh();
+        self.assertTrue(_mesh_from_distant.isEqual(meshRef,1e-12))
+        pass
+
+    def testCorbaFetching1DGTUMesh(self):
+        meshPtr=self._objC.get1DGTUMesh();
+        _mesh_from_distant=MEDCoupling1DGTUMeshClient.New(meshPtr);
+        meshPtr.UnRegister();
+        test=MEDCouplingCorbaSwigTest.MEDCouplingCorbaServBasicsTest()
+        meshRef=test.build1DGTUMesh();
+        self.assertTrue(_mesh_from_distant.isEqual(meshRef,1e-12))
+        pass
     
     def testCorbaField2DNTFetching(self):
         fieldPtr=self._objC.getFieldScalarOn2DNT();