Skip to content

Commit

Permalink
refs #5744. Extend tests to ensure other properties copied
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed Aug 14, 2012
1 parent 12b36a5 commit df63a55
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "MantidAPI/MultiPeriodGroupAlgorithm.h"
#include "MantidKernel/ArrayProperty.h"
#include "MantidTestHelpers/FakeObjects.h"
#include "MantidKernel/MandatoryValidator.h"

using namespace Mantid::API;
using namespace Mantid::Kernel;
Expand All @@ -21,6 +22,7 @@ class TestAlgorithm : public MultiPeriodGroupAlgorithm
{
declareProperty(new ArrayProperty<std::string>("MyInputWorkspaces"));
declareProperty(new WorkspaceProperty<>("OutputWorkspace","",Direction::Output), "");
declareProperty("PropertyA", 1, boost::make_shared<Kernel::MandatoryValidator<int> >()); // I'm only adding this property to cause errors if it's not passed to spawned algorithms.
}
virtual void exec()
{
Expand Down Expand Up @@ -171,6 +173,7 @@ class MultiPeriodGroupAlgorithmTest : public CxxTest::TestSuite
alg.setRethrows(true);
alg.initialize();
alg.setPropertyValue("MyInputWorkspaces", "a, b, c");
alg.setProperty("PropertyA", 1);
alg.setPropertyValue("OutputWorkspace", "outWS");
TS_ASSERT_THROWS_NOTHING(alg.execute());
TS_ASSERT(alg.isExecuted());
Expand Down

0 comments on commit df63a55

Please sign in to comment.