-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove PeakOverlayFactoryBase class. Most of the logic had already been stripped out of this type. Also added a test for the NullPeaksPresenter since object of this type should be neutral in existance, yielding no noticable affect on the system whatsoever.
- Loading branch information
1 parent
a7866b4
commit 49acde5
Showing
7 changed files
with
76 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 0 additions & 37 deletions
37
Code/Mantid/MantidQt/SliceViewer/inc/MantidQtSliceViewer/PeakOverlayFactoryBase.h
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
Code/Mantid/MantidQt/SliceViewer/src/PeakOverlayFactoryBase.cpp
This file was deleted.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
Code/Mantid/MantidQt/SliceViewer/test/NullPeaksPresenterTest.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#ifndef SLICE_VIEWER_NULLPEAKSPRESENTER_TEST_H_ | ||
#define SLICE_VIEWER_NULLPEAKSPRESENTER_TEST_H_ | ||
|
||
#include <cxxtest/TestSuite.h> | ||
#include "MantidQtSliceViewer/NullPeaksPresenter.h" | ||
|
||
using namespace MantidQt::SliceViewer; | ||
using namespace Mantid; | ||
|
||
class NullPeaksPresenterTest : public CxxTest::TestSuite | ||
{ | ||
|
||
public: | ||
|
||
void test_construction() | ||
{ | ||
TS_ASSERT_THROWS_NOTHING(NullPeaksPresenter p()); | ||
} | ||
|
||
void test_is_peaks_presenter() | ||
{ | ||
NullPeaksPresenter presenter; | ||
PeaksPresenter& base = presenter; // compile-time test for the is-a relationship | ||
} | ||
|
||
/* Test individual methods on the interface */ | ||
|
||
void test_update_does_nothing() | ||
{ | ||
NullPeaksPresenter presenter; | ||
TS_ASSERT_THROWS_NOTHING(presenter.update()); | ||
} | ||
|
||
void test_updateWithSlicePoint_does_nothing() | ||
{ | ||
NullPeaksPresenter presenter; | ||
TS_ASSERT_THROWS_NOTHING(presenter.updateWithSlicePoint(0)); | ||
} | ||
|
||
void test_changeShownDim_does_nothing() | ||
{ | ||
NullPeaksPresenter presenter; | ||
TS_ASSERT_THROWS_NOTHING(presenter.changeShownDim()); | ||
} | ||
|
||
void test_isLabelOfFreeAxis_always_returns_false() | ||
{ | ||
NullPeaksPresenter presenter; | ||
TS_ASSERT(!presenter.isLabelOfFreeAxis("")); | ||
} | ||
|
||
}; | ||
|
||
#endif |
171 changes: 0 additions & 171 deletions
171
Code/Mantid/MantidQt/SliceViewer/test/PeakOverlayFactoryBaseTest.h
This file was deleted.
Oops, something went wrong.