Newer
Older
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
// Act
LoadMD alg;
alg.setRethrows(true);
TS_ASSERT_THROWS_NOTHING(alg.initialize())
TS_ASSERT(alg.isInitialized())
TS_ASSERT_THROWS_NOTHING(alg.setPropertyValue("Filename", filename));
TS_ASSERT_THROWS_NOTHING(alg.setProperty("FileBackEnd", false));
TS_ASSERT_THROWS_NOTHING(
alg.setPropertyValue("OutputWorkspace", outWSName));
TS_ASSERT_THROWS_NOTHING(alg.setProperty("MetadataOnly", false));
TS_ASSERT_THROWS_NOTHING(alg.execute(););
TS_ASSERT(alg.isExecuted());
// Retrieve the workspace from data service.
IMDHistoWorkspace_sptr iws;
TS_ASSERT_THROWS_NOTHING(
iws = AnalysisDataService::Instance().retrieveWS<IMDHistoWorkspace>(
outWSName));
TS_ASSERT(iws);
if (!iws) {
return;
}
// Assert
// We expect the first three dimensions to be QSample and the fourth to be a
// GeneralFrame
for (int index = 0; index < 3; ++index) {
TSM_ASSERT_EQUALS(
"The first three dimension should contain an Unkown frame",
iws->getDimension(index)->getMDFrame().name(),
Mantid::Geometry::UnknownFrame::UnknownFrameName);
}
TSM_ASSERT_EQUALS("The fourth dimension should contain an Unkown frame",
iws->getDimension(3)->getMDFrame().name(),
Mantid::Geometry::UnknownFrame::UnknownFrameName);
// Clean up
if (iws) {
AnalysisDataService::Instance().remove(outWSName);
}
}
};
#endif /* MANTID_MDEVENTS_LOADMDEWTEST_H_ */