diff --git a/Code/Mantid/Framework/API/src/AlgorithmProxy.cpp b/Code/Mantid/Framework/API/src/AlgorithmProxy.cpp index bec698cf3f8fa34f2ea149a0b511729a68a4494a..014788ec8d1bfb6d12dab0a663246c28c78f7586 100644 --- a/Code/Mantid/Framework/API/src/AlgorithmProxy.cpp +++ b/Code/Mantid/Framework/API/src/AlgorithmProxy.cpp @@ -22,7 +22,7 @@ namespace Mantid /// Constructor AlgorithmProxy::AlgorithmProxy(Algorithm_sptr alg) : PropertyManagerOwner(),_executeAsync(this,&AlgorithmProxy::executeAsyncImpl), - m_name(alg->name()),m_category(alg->category()), + m_name(alg->name()),m_category(alg->category()), m_alias(alg->alias()), m_version(alg->version()), m_alg(alg), m_isExecuted(),m_isLoggingEnabled(true), m_rethrow(false) { diff --git a/Code/Mantid/Framework/API/test/AlgorithmProxyTest.h b/Code/Mantid/Framework/API/test/AlgorithmProxyTest.h index f06792f5804d2b4bbe663821da99bc815ff37b99..093b9b9bdc397250f161a3c3056e161eecdc2cda 100644 --- a/Code/Mantid/Framework/API/test/AlgorithmProxyTest.h +++ b/Code/Mantid/Framework/API/test/AlgorithmProxyTest.h @@ -20,7 +20,8 @@ public: virtual ~ToyAlgorithmProxy() {} const std::string name() const { return "ToyAlgorithmProxy";} ///< Algorithm's name for identification int version() const { return 1;} ///< Algorithm's version for identification - const std::string category() const { return "Cat";} ///< Algorithm's category for identification + const std::string category() const { return "ProxyCat";} ///< Algorithm's category for identification + const std::string alias() const { return "Dog";} ///< Algorithm's alias void init() { @@ -80,7 +81,8 @@ public: TS_ASSERT( dynamic_cast<AlgorithmProxy*>(alg.get()) ); TS_ASSERT_EQUALS( alg->name() , "ToyAlgorithmProxy" ); TS_ASSERT_EQUALS( alg->version() , 1 ); - TS_ASSERT_EQUALS( alg->category() , "Cat" ); + TS_ASSERT_EQUALS( alg->category() , "ProxyCat" ); + TS_ASSERT_EQUALS( alg->alias(), "Dog"); TS_ASSERT( alg->isInitialized() ); alg->setChild(true); TS_ASSERT( !alg->isChild() ); diff --git a/Code/Mantid/Framework/API/test/AlgorithmTest.h b/Code/Mantid/Framework/API/test/AlgorithmTest.h index 32411ba444b8cced3aa132dba727e16f15147d2f..ec71563e8d65138d9a2475849c6858917a2e8899 100644 --- a/Code/Mantid/Framework/API/test/AlgorithmTest.h +++ b/Code/Mantid/Framework/API/test/AlgorithmTest.h @@ -18,6 +18,7 @@ public: const std::string name() const { return "ToyAlgorithm";} ///< Algorithm's name for identification int version() const { return 1;} ///< Algorithm's version for identification const std::string category() const { return "Cat";} ///< Algorithm's category for identification + const std::string alias() const { return "Dog";} void init() { @@ -45,6 +46,7 @@ public: const std::string name() const { return "ToyAlgorithm";} ///< Algorithm's name for identification int version() const { return 2;} ///< Algorithm's version for identification const std::string category() const { return "Cat";} + const std::string alias() const { return "Dog";} void init() { declareProperty("prop1","value"); @@ -102,6 +104,11 @@ public: TS_ASSERT_EQUALS( alg.category(),"Cat" ); } + void testAlias() + { + TS_ASSERT_EQUALS( alg.alias(), "Dog"); + } + void testIsChild() { TS_ASSERT_EQUALS(false, alg.isChild());