Skip to content
Snippets Groups Projects
Commit ac5a3a06 authored by Gemma Guest's avatar Gemma Guest
Browse files

Add unit test for instrument-changed

Re #26529
parent 6d6d57d7
No related branches found
No related tags found
No related merge requests found
...@@ -111,7 +111,7 @@ public: ...@@ -111,7 +111,7 @@ public:
verifyAndClearExpectations(); verifyAndClearExpectations();
} }
void testNotifyInstrumentChanged() { void testNotifyChangeInstrumentRequested() {
auto presenter = makePresenter(m_view, ReductionJobs()); auto presenter = makePresenter(m_view, ReductionJobs());
auto const instrument = std::string("test_instrument"); auto const instrument = std::string("test_instrument");
EXPECT_CALL(m_view, getInstrumentName()) EXPECT_CALL(m_view, getInstrumentName())
...@@ -123,6 +123,14 @@ public: ...@@ -123,6 +123,14 @@ public:
verifyAndClearExpectations(); verifyAndClearExpectations();
} }
void testNotifyInstrumentChanged() {
auto presenter = makePresenter(m_view, ReductionJobs());
auto const instrument = std::string("test_instrument");
EXPECT_CALL(m_view, setInstrumentName(instrument)).Times(1);
presenter.notifyInstrumentChanged(instrument);
verifyAndClearExpectations();
}
void testRowStateChangedForDefaultRowAndGroup() { void testRowStateChangedForDefaultRowAndGroup() {
auto presenter = makePresenter(m_view, oneGroupWithARowModel()); auto presenter = makePresenter(m_view, oneGroupWithARowModel());
expectGroupStateCleared(); expectGroupStateCleared();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment