Skip to content

Commit

Permalink
refs #10102. Refactor to base test class.
Browse files Browse the repository at this point in the history
Templated base class taking algorithm as type argument. Shared test code is much neater now. Duplication is at an absolute minimal.
  • Loading branch information
OwenArnold committed Aug 15, 2014
1 parent 7a6434f commit 915fe44
Show file tree
Hide file tree
Showing 4 changed files with 560 additions and 618 deletions.
4 changes: 3 additions & 1 deletion Code/Mantid/Framework/Algorithms/src/RebinByTimeBase.cpp
Expand Up @@ -70,9 +70,11 @@ namespace Algorithms
{
using Mantid::DataObjects::EventWorkspace;
IEventWorkspace_sptr inWS = getProperty("InputWorkspace");

if(!boost::dynamic_pointer_cast<EventWorkspace>(inWS))
{
throw std::invalid_argument("RebinByPulseTimes requires an EventWorkspace as an input.");
const std::string algName = this->name();
throw std::invalid_argument( algName + " Algorithm requires an EventWorkspace as an input.");
}

MatrixWorkspace_sptr outputWS = getProperty("OutputWorkspace");
Expand Down

0 comments on commit 915fe44

Please sign in to comment.