Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef MANTID_ALGORITHMS_REFLECTOMETRYSUMINQTEST_H_
#define MANTID_ALGORITHMS_REFLECTOMETRYSUMINQTEST_H_
#include <cxxtest/TestSuite.h>
#include "MantidAlgorithms/ReflectometrySumInQ.h"
using Mantid::Algorithms::ReflectometrySumInQ;
class ReflectometrySumInQTest : public CxxTest::TestSuite {
public:
// This pair of boilerplate methods prevent the suite being created statically
// This means the constructor isn't called when running other tests
static ReflectometrySumInQTest *createSuite() { return new ReflectometrySumInQTest(); }
static void destroySuite( ReflectometrySumInQTest *suite ) { delete suite; }
void test_Init()
{
ReflectometrySumInQ alg;
TS_ASSERT_THROWS_NOTHING( alg.initialize() )
TS_ASSERT( alg.isInitialized() )
}
void test_exec()
{
/*// Create test input if necessary
MatrixWorkspace_sptr inputWS = //-- Fill in appropriate code. Consider using TestHelpers/WorkspaceCreationHelpers.h --
ReflectometrySumInQ alg;
// Don't put output in ADS by default
alg.setChild(true);
TS_ASSERT_THROWS_NOTHING( alg.initialize() )
TS_ASSERT( alg.isInitialized() )
TS_ASSERT_THROWS_NOTHING( alg.setProperty("InputWorkspace", inputWS) );
TS_ASSERT_THROWS_NOTHING( alg.setPropertyValue("OutputWorkspace", "_unused_for_child") );
TS_ASSERT_THROWS_NOTHING( alg.execute(); );
TS_ASSERT( alg.isExecuted() );
// Retrieve the workspace from the algorithm. The type here will probably need to change. It should
// be the type using in declareProperty for the "OutputWorkspace" type.
// We can't use auto as it's an implicit conversion.
Workspace_sptr outputWS = alg.getProperty("OutputWorkspace");
TS_ASSERT(outputWS);
TS_FAIL("TODO: Check the results and remove this line");*/
}
void test_Something()
{
TS_FAIL( "You forgot to write a test!");
}
};
#endif /* MANTID_ALGORITHMS_REFLECTOMETRYSUMINQTEST_H_ */