Skip to content

Commit

Permalink
Refs #9371 Fix broken unit tests
Browse files Browse the repository at this point in the history
I forgot to update the tests after changing the type signature of
askUserString.
  • Loading branch information
Harry Jeffery committed Sep 9, 2014
1 parent 0b2e983 commit 69e1581
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
Expand Up @@ -27,7 +27,7 @@ class ReflBlankMainViewPresenterTest : public CxxTest::TestSuite
public:
ConstructView(){};
MOCK_METHOD1(showTable, void(Mantid::API::ITableWorkspace_sptr));
MOCK_METHOD0(askUserString, bool());
MOCK_METHOD3(askUserString, bool(const std::string& prompt, const std::string& title, const std::string& defaultValue));
MOCK_METHOD2(askUserYesNo, bool(std::string, std::string));
MOCK_METHOD2(giveUserCritical, void(std::string, std::string));
MOCK_METHOD2(giveUserInfo, void(std::string, std::string));
Expand All @@ -44,7 +44,7 @@ class ReflBlankMainViewPresenterTest : public CxxTest::TestSuite
public:
MockView(){};
virtual void showTable(Mantid::API::ITableWorkspace_sptr model){(void)model;}
MOCK_METHOD0(askUserString, bool());
MOCK_METHOD3(askUserString, bool(const std::string& prompt, const std::string& title, const std::string& defaultValue));
MOCK_METHOD2(askUserYesNo, bool(std::string, std::string));
MOCK_METHOD2(giveUserCritical, void(std::string, std::string));
MOCK_METHOD2(giveUserInfo, void(std::string, std::string));
Expand All @@ -71,7 +71,7 @@ class ReflBlankMainViewPresenterTest : public CxxTest::TestSuite
row = model->appendRow();
row << "13470" << "2.3" << "13463,13464" << "0.035" << "0.3" << "0.04" << "1" << 3;
}
MOCK_METHOD0(askUserString, bool());
MOCK_METHOD3(askUserString, bool(const std::string& prompt, const std::string& title, const std::string& defaultValue));
MOCK_METHOD2(askUserYesNo, bool(std::string, std::string));
MOCK_METHOD2(giveUserCritical, void(std::string, std::string));
MOCK_METHOD2(giveUserInfo, void(std::string, std::string));
Expand All @@ -91,7 +91,7 @@ class ReflBlankMainViewPresenterTest : public CxxTest::TestSuite
{
m_model = model;
}
MOCK_METHOD0(askUserString, bool());
MOCK_METHOD3(askUserString, bool(const std::string& prompt, const std::string& title, const std::string& defaultValue));
MOCK_METHOD2(askUserYesNo, bool(std::string, std::string));
MOCK_METHOD2(giveUserCritical, void(std::string, std::string));
MOCK_METHOD2(giveUserInfo, void(std::string, std::string));
Expand Down Expand Up @@ -151,7 +151,7 @@ class ReflBlankMainViewPresenterTest : public CxxTest::TestSuite
EXPECT_CALL(fakeView, getUserString())
.Times(1)
.WillRepeatedly(Return("Workspace"));
EXPECT_CALL(fakeView, askUserString())
EXPECT_CALL(fakeView, askUserString(_,_,_))
.Times(1)
.WillRepeatedly(Return(true));
ReflBlankMainViewPresenter presenter(&fakeView);
Expand All @@ -176,7 +176,7 @@ class ReflBlankMainViewPresenterTest : public CxxTest::TestSuite
.WillOnce(Return(saveFlag))
.WillOnce(Return(saveFlag));
EXPECT_CALL(mockView, getUserString()).Times(1).WillRepeatedly(Return("Workspace"));
EXPECT_CALL(mockView, askUserString()).Times(2).WillOnce(Return(false)).WillRepeatedly(Return(true));
EXPECT_CALL(mockView, askUserString(_,_,_)).Times(2).WillOnce(Return(false)).WillRepeatedly(Return(true));
ReflBlankMainViewPresenter presenter(&mockView);
presenter.notify();
presenter.notify();
Expand All @@ -201,7 +201,7 @@ class ReflBlankMainViewPresenterTest : public CxxTest::TestSuite
EXPECT_CALL(mockView, getUserString())
.Times(1)
.WillRepeatedly(Return("Workspace"));
EXPECT_CALL(mockView, askUserString())
EXPECT_CALL(mockView, askUserString(_,_,_))
.Times(2)
.WillOnce(Return(false))
.WillRepeatedly(Return(true));
Expand Down Expand Up @@ -231,7 +231,7 @@ class ReflBlankMainViewPresenterTest : public CxxTest::TestSuite
EXPECT_CALL(mockView, getUserString())
.Times(1)
.WillRepeatedly(Return("Workspace"));
EXPECT_CALL(mockView, askUserString())
EXPECT_CALL(mockView, askUserString(_,_,_))
.Times(1)
.WillRepeatedly(Return(true));
EXPECT_CALL(mockView, getSelectedRowIndexes())
Expand Down Expand Up @@ -275,7 +275,7 @@ class ReflBlankMainViewPresenterTest : public CxxTest::TestSuite
EXPECT_CALL(mockView, getUserString())
.Times(1)
.WillRepeatedly(Return("Workspace"));
EXPECT_CALL(mockView, askUserString())
EXPECT_CALL(mockView, askUserString(_,_,_))
.Times(1)
.WillRepeatedly(Return(true));
EXPECT_CALL(mockView, getSelectedRowIndexes())
Expand Down Expand Up @@ -321,7 +321,7 @@ class ReflBlankMainViewPresenterTest : public CxxTest::TestSuite
EXPECT_CALL(mockView, getUserString())
.Times(1)
.WillRepeatedly(Return("Workspace"));
EXPECT_CALL(mockView, askUserString())
EXPECT_CALL(mockView, askUserString(_,_,_))
.Times(1)
.WillRepeatedly(Return(true));
EXPECT_CALL(mockView, getSelectedRowIndexes())
Expand Down Expand Up @@ -374,7 +374,7 @@ class ReflBlankMainViewPresenterTest : public CxxTest::TestSuite
EXPECT_CALL(mockView, getUserString())
.Times(1)
.WillRepeatedly(Return("Workspace"));
EXPECT_CALL(mockView, askUserString())
EXPECT_CALL(mockView, askUserString(_,_,_))
.Times(1)
.WillRepeatedly(Return(true));
EXPECT_CALL(mockView, getSelectedRowIndexes())
Expand Down Expand Up @@ -423,7 +423,7 @@ class ReflBlankMainViewPresenterTest : public CxxTest::TestSuite
EXPECT_CALL(mockView, getUserString())
.Times(1)
.WillRepeatedly(Return("Workspace"));
EXPECT_CALL(mockView, askUserString())
EXPECT_CALL(mockView, askUserString(_,_,_))
.Times(1)
.WillRepeatedly(Return(true));
EXPECT_CALL(mockView, getSelectedRowIndexes())
Expand Down Expand Up @@ -461,7 +461,7 @@ class ReflBlankMainViewPresenterTest : public CxxTest::TestSuite
EXPECT_CALL(mockView, getUserString())
.Times(1)
.WillRepeatedly(Return("Workspace"));
EXPECT_CALL(mockView, askUserString())
EXPECT_CALL(mockView, askUserString(_,_,_))
.Times(1)
.WillRepeatedly(Return(true));
EXPECT_CALL(mockView, getSelectedRowIndexes())
Expand Down Expand Up @@ -498,7 +498,7 @@ class ReflBlankMainViewPresenterTest : public CxxTest::TestSuite
EXPECT_CALL(mockView, getUserString())
.Times(1)
.WillRepeatedly(Return("Workspace"));
EXPECT_CALL(mockView, askUserString())
EXPECT_CALL(mockView, askUserString(_,_,_))
.Times(1)
.WillRepeatedly(Return(true));
EXPECT_CALL(mockView, getSelectedRowIndexes())
Expand Down Expand Up @@ -540,7 +540,7 @@ class ReflBlankMainViewPresenterTest : public CxxTest::TestSuite
EXPECT_CALL(mockView, getUserString())
.Times(1)
.WillRepeatedly(Return("Workspace"));
EXPECT_CALL(mockView, askUserString())
EXPECT_CALL(mockView, askUserString(_,_,_))
.Times(1)
.WillRepeatedly(Return(true));
EXPECT_CALL(mockView, getSelectedRowIndexes())
Expand Down
Expand Up @@ -29,7 +29,7 @@ class ReflLoadedMainViewPresenterTest : public CxxTest::TestSuite
public:
ConstructView(){};
MOCK_METHOD1(showTable, void(Mantid::API::ITableWorkspace_sptr));
MOCK_METHOD0(askUserString, bool());
MOCK_METHOD3(askUserString, bool(const std::string& prompt, const std::string& title, const std::string& defaultValue));
MOCK_METHOD2(askUserYesNo, bool(std::string, std::string));
MOCK_METHOD2(giveUserCritical, void(std::string, std::string));
MOCK_METHOD2(giveUserInfo, void(std::string, std::string));
Expand All @@ -46,7 +46,7 @@ class ReflLoadedMainViewPresenterTest : public CxxTest::TestSuite
public:
MockView(){};
virtual void showTable(Mantid::API::ITableWorkspace_sptr model){(void)model;}
MOCK_METHOD0(askUserString, bool());
MOCK_METHOD3(askUserString, bool(const std::string& prompt, const std::string& title, const std::string& defaultValue));
MOCK_METHOD2(askUserYesNo, bool(std::string, std::string));
MOCK_METHOD2(giveUserCritical, void(std::string, std::string));
MOCK_METHOD2(giveUserInfo, void(std::string, std::string));
Expand All @@ -68,7 +68,7 @@ class ReflLoadedMainViewPresenterTest : public CxxTest::TestSuite

row << "13464" << "0.6" << "13465" << "0.02" << "0.03" << "0.05" << "8" << 2;
}
MOCK_METHOD0(askUserString, bool());
MOCK_METHOD3(askUserString, bool(const std::string& prompt, const std::string& title, const std::string& defaultValue));
MOCK_METHOD2(askUserYesNo, bool(std::string, std::string));
MOCK_METHOD2(giveUserCritical, void(std::string, std::string));
MOCK_METHOD2(giveUserInfo, void(std::string, std::string));
Expand Down Expand Up @@ -261,7 +261,7 @@ class ReflLoadedMainViewPresenterTest : public CxxTest::TestSuite
EXPECT_CALL(mockView, getUserString())
.Times(1)
.WillRepeatedly(Return("Workspace"));
EXPECT_CALL(mockView, askUserString())
EXPECT_CALL(mockView, askUserString(_,_,_))
.Times(2)
.WillOnce(Return(false))
.WillRepeatedly(Return(true));
Expand Down Expand Up @@ -290,7 +290,7 @@ class ReflLoadedMainViewPresenterTest : public CxxTest::TestSuite
EXPECT_CALL(mockView, getUserString())
.Times(1)
.WillRepeatedly(Return("Workspace"));
EXPECT_CALL(mockView, askUserString())
EXPECT_CALL(mockView, askUserString(_,_,_))
.Times(2)
.WillOnce(Return(false))
.WillRepeatedly(Return(true));
Expand Down

0 comments on commit 69e1581

Please sign in to comment.