diff --git a/Code/Mantid/Framework/CurveFitting/test/ProductLinearExpTest.h b/Code/Mantid/Framework/CurveFitting/test/ProductLinearExpTest.h index 98e5e602977b38b645dbbf892cedde1418555eda..5ba6f602e3165f273b62450194b0c9b6032b00b1 100644 --- a/Code/Mantid/Framework/CurveFitting/test/ProductLinearExpTest.h +++ b/Code/Mantid/Framework/CurveFitting/test/ProductLinearExpTest.h @@ -10,6 +10,7 @@ #include "MantidCurveFitting/Jacobian.h" #include "MantidAPI/FunctionDomain1D.h" #include "MantidAPI/FunctionValues.h" +#include "MantidAPI/FunctionFactory.h" #include <algorithm> #include <boost/shared_ptr.hpp> #include <boost/make_shared.hpp> @@ -114,12 +115,20 @@ public: TS_ASSERT_EQUALS("ProductLinearExp", func.name()); } - void test_catagory() + void test_category() { ProductLinearExp func; TS_ASSERT_EQUALS("Calibrate", func.category()); } + void test_registered_with_factory() + { + IFunction_sptr func = FunctionFactory::Instance().createFunction("ProductLinearExp"); + TS_ASSERT(func != NULL); + TS_ASSERT_EQUALS(func->name(), "ProductLinearExp"); + TS_ASSERT(boost::dynamic_pointer_cast<ProductLinearExp>(func) != NULL); + } + void test_set_parameters() { const double A0 = 1; diff --git a/Code/Mantid/Framework/CurveFitting/test/ProductQuadraticExpTest.h b/Code/Mantid/Framework/CurveFitting/test/ProductQuadraticExpTest.h index eba31d5f6662ee720e3511ac562990c258d68ca7..55aebbabda315723cdd798c29ce7210bce7d5dfd 100644 --- a/Code/Mantid/Framework/CurveFitting/test/ProductQuadraticExpTest.h +++ b/Code/Mantid/Framework/CurveFitting/test/ProductQuadraticExpTest.h @@ -10,6 +10,7 @@ #include "MantidCurveFitting/Jacobian.h" #include "MantidAPI/FunctionDomain1D.h" #include "MantidAPI/FunctionValues.h" +#include "MantidAPI/FunctionFactory.h" #include <algorithm> #include <boost/shared_ptr.hpp> #include <boost/make_shared.hpp> @@ -109,12 +110,20 @@ public: TS_ASSERT_EQUALS("ProductQuadraticExp", func.name()); } - void test_catagory() + void test_category() { ProductQuadraticExp func; TS_ASSERT_EQUALS("Calibrate", func.category()); } + void test_registered_with_factory() + { + IFunction_sptr func = FunctionFactory::Instance().createFunction("ProductQuadraticExp"); + TS_ASSERT(func != NULL); + TS_ASSERT_EQUALS(func->name(), "ProductQuadraticExp"); + TS_ASSERT(boost::dynamic_pointer_cast<ProductQuadraticExp>(func) != NULL); + } + void test_set_parameters() { const double A0 = 1;