From 4fc953044a8b0e686c85ce200076bc283e07149c Mon Sep 17 00:00:00 2001
From: Harry Jeffery <henry.jeffery@stfc.ac.uk>
Date: Mon, 30 Mar 2015 14:21:28 +0100
Subject: [PATCH] Refs #11355 Transfer projection columns test

---
 .../Framework/MDAlgorithms/test/CutMDTest.h   | 19 +++++++++++++++++++
 .../test/python/mantid/api/CutMDTest.py       |  6 ------
 2 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/Code/Mantid/Framework/MDAlgorithms/test/CutMDTest.h b/Code/Mantid/Framework/MDAlgorithms/test/CutMDTest.h
index d516aa97fe8..0e793fc2f47 100644
--- a/Code/Mantid/Framework/MDAlgorithms/test/CutMDTest.h
+++ b/Code/Mantid/Framework/MDAlgorithms/test/CutMDTest.h
@@ -189,6 +189,25 @@ public:
 
     AnalysisDataService::Instance().remove(wsName);
   }
+
+  void test_wrong_proj_format_columns() {
+    const std::string wsName = "__CutMDTest_wrong_proj_columns";
+
+    ITableWorkspace_sptr proj = WorkspaceFactory::Instance().createTable();
+    proj->addColumn("str", "name");
+
+    auto algCutMD = FrameworkManager::Instance().createAlgorithm("CutMD");
+    algCutMD->initialize();
+    algCutMD->setRethrows(true);
+    algCutMD->setProperty("InputWorkspace", sharedWSName);
+    algCutMD->setProperty("OutputWorkspace", wsName);
+    algCutMD->setProperty("Projection", proj);
+    algCutMD->setProperty("P1Bin", "0.1");
+    algCutMD->setProperty("P2Bin", "0.2");
+    algCutMD->setProperty("P3Bin", "0.1");
+    algCutMD->setProperty("CheckAxes", false);
+    TS_ASSERT_THROWS(algCutMD->execute(), std::runtime_error);
+  }
 };
 
 #endif /* MANTID_MDALGORITHMS_CUTMDTEST_H_ */
diff --git a/Code/Mantid/Framework/PythonInterface/test/python/mantid/api/CutMDTest.py b/Code/Mantid/Framework/PythonInterface/test/python/mantid/api/CutMDTest.py
index 395578cbfba..f0d887d8aab 100644
--- a/Code/Mantid/Framework/PythonInterface/test/python/mantid/api/CutMDTest.py
+++ b/Code/Mantid/Framework/PythonInterface/test/python/mantid/api/CutMDTest.py
@@ -21,12 +21,6 @@ class CutMDTest(unittest.TestCase):
         
     def tearDown(self):
         DeleteWorkspace(self.__in_md )
-
-    def test_wrong_projection_workspace_format_wrong_column_numbers(self):
-        projection = CreateEmptyTableWorkspace()
-        projection.addColumn("str", "name")
-        # missing other columns
-        self.assertRaises(RuntimeError, CutMD, InputWorkspace=self.__in_md, Projection=projection, OutputWorkspace="out_ws", P1Bin=[0.1], P2Bin=[0.1], P3Bin=[0.1], CheckAxes=False)
         
     def test_wrong_table_workspace_format_wrong_row_numbers(self):
         projection = CreateEmptyTableWorkspace()
-- 
GitLab