Commit 60b11b66 authored by Lynch, Vickie's avatar Lynch, Vickie
Browse files

Refs #22420 fix unit test

parent 4dd9dd3b
...@@ -70,32 +70,32 @@ public: ...@@ -70,32 +70,32 @@ public:
alg.setProperty("Peaks", WSName); alg.setProperty("Peaks", WSName);
alg.setProperty("FracPeaks", std::string("FracPeaks")); alg.setProperty("SatellitePeaks", std::string("SatellitePeaks"));
alg.setProperty("Offset1", "0.5,0,.2,1"); alg.setProperty("OffsetVector1", "0.5,0,.2,1");
TS_ASSERT(alg.execute()); TS_ASSERT(alg.execute());
TS_ASSERT(alg.isExecuted()); TS_ASSERT(alg.isExecuted());
alg.setPropertyValue("FracPeaks", "FracPeaks"); alg.setPropertyValue("SatellitePeaks", "SatellitePeaks");
PeaksWorkspace_sptr FracPeaks = alg.getProperty("FracPeaks"); PeaksWorkspace_sptr SatellitePeaks = alg.getProperty("SatellitePeaks");
TS_ASSERT_EQUALS(FracPeaks->getNumberPeaks(), 117); TS_ASSERT_EQUALS(SatellitePeaks->getNumberPeaks(), 122);
Peak &peakx = dynamic_cast<Peak &>(FracPeaks->getPeak(0)); Peak &peakx = dynamic_cast<Peak &>(SatellitePeaks->getPeak(0));
Peak peak = peakx; Peak peak = peakx;
TS_ASSERT_DELTA(peak.getH(), -5.5, .0001); TS_ASSERT_DELTA(peak.getH(), -5.5, .0001);
TS_ASSERT_DELTA(peak.getK(), 7.0, .0001); TS_ASSERT_DELTA(peak.getK(), 7.0, .0001);
TS_ASSERT_DELTA(peak.getL(), -3.8, .0001); TS_ASSERT_DELTA(peak.getL(), -4.2, .0001);
peakx = dynamic_cast<Peak &>(FracPeaks->getPeak(3)); peakx = dynamic_cast<Peak &>(SatellitePeaks->getPeak(3));
peak = peakx; peak = peakx;
TS_ASSERT_DELTA(peak.getH(), -5.5, .0001); TS_ASSERT_DELTA(peak.getH(), -5.5, .0001);
TS_ASSERT_DELTA(peak.getK(), 3.0, .0001); TS_ASSERT_DELTA(peak.getK(), 3.0, .0001);
TS_ASSERT_DELTA(peak.getL(), -2.8, .0001); TS_ASSERT_DELTA(peak.getL(), -3.2, .0001);
peakx = dynamic_cast<Peak &>(FracPeaks->getPeak(6)); peakx = dynamic_cast<Peak &>(SatellitePeaks->getPeak(6));
peak = peakx; peak = peakx;
TS_ASSERT_DELTA(peak.getH(), -6.5, .0001); TS_ASSERT_DELTA(peak.getH(), -6.5, .0001);
TS_ASSERT_DELTA(peak.getK(), 4.0, .0001); TS_ASSERT_DELTA(peak.getK(), 4.0, .0001);
TS_ASSERT_DELTA(peak.getL(), -3.8, .0001); TS_ASSERT_DELTA(peak.getL(), -4.2, .0001);
} }
}; };
......
...@@ -70,7 +70,7 @@ public: ...@@ -70,7 +70,7 @@ public:
MOCK_CONST_METHOD0(getModStru, Mantid::Kernel::V3D()); MOCK_CONST_METHOD0(getModStru, Mantid::Kernel::V3D());
MOCK_METHOD1(setRunNumber, void(int m_RunNumber)); MOCK_METHOD1(setRunNumber, void(int m_RunNumber));
MOCK_METHOD1(setPeakNumber, void(int m_PeakNumber)); MOCK_METHOD1(setPeakNumber, void(int m_PeakNumber));
MOCK_METHOD1(setModStru, void(int m_ModStru)); MOCK_METHOD1(setModStru, void(Mantid::Kernel::V3D m_ModStru));
MOCK_CONST_METHOD0(getMonitorCount, double()); MOCK_CONST_METHOD0(getMonitorCount, double());
MOCK_METHOD1(setMonitorCount, void(double m_MonitorCount)); MOCK_METHOD1(setMonitorCount, void(double m_MonitorCount));
MOCK_CONST_METHOD0(getH, double()); MOCK_CONST_METHOD0(getH, double());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment