Skip to content
Snippets Groups Projects
OneStepMDEWTest.h 1.13 KiB
Newer Older
#ifndef MANTID_MDEVENTS_ONESTEPMDEWTEST_H_
#define MANTID_MDEVENTS_ONESTEPMDEWTEST_H_

#include <cxxtest/TestSuite.h>

#include "MantidAPI/AnalysisDataService.h"
#include "MantidAPI/IMDEventWorkspace.h"
#include "MantidDataObjects/MDEventWorkspace.h"
#include "MantidMDAlgorithms/OneStepMDEW.h"

using namespace Mantid::API;
using namespace Mantid::MDAlgorithms;
class OneStepMDEWTest : public CxxTest::TestSuite {
  void test_Init() {
    TS_ASSERT_THROWS_NOTHING(alg.initialize())
    TS_ASSERT(alg.isInitialized())

  void test_exec() {
    TS_ASSERT_THROWS_NOTHING(alg.initialize())
    TS_ASSERT(alg.isInitialized())
Owen Arnold's avatar
Owen Arnold committed
    alg.setPropertyValue("Filename", "HYS_11092_event.nxs");
    alg.setPropertyValue("OutputWorkspace", "OneStepMDEWTest");
    alg.execute();
    TS_ASSERT(alg.isExecuted());

    IMDEventWorkspace_sptr out;
    TS_ASSERT_THROWS_NOTHING(
        out = boost::dynamic_pointer_cast<IMDEventWorkspace>(
            AnalysisDataService::Instance().retrieve("OneStepMDEWTest")););
    if (!out)
      return;
  }
};

#endif /* MANTID_MDEVENTS_ONESTEPMDEWTEST_H_ */