Skip to content

Commit

Permalink
Refs #10440 Fix unit tests for ClearRows
Browse files Browse the repository at this point in the history
  • Loading branch information
Harry Jeffery committed Nov 3, 2014
1 parent aa420b5 commit 6c66253
Showing 1 changed file with 5 additions and 7 deletions.
Expand Up @@ -847,8 +847,6 @@ class ReflMainViewPresenterTest : public CxxTest::TestSuite
void testClearRows()
{
MockView mockView;
EXPECT_CALL(mockView, setInstrumentList(_,_)).Times(1);
EXPECT_CALL(mockView, setTableList(_)).Times(AnyNumber());
ReflMainViewPresenter presenter(&mockView);

createPrefilledWorkspace("TestWorkspace");
Expand All @@ -872,13 +870,13 @@ class ReflMainViewPresenterTest : public CxxTest::TestSuite
auto ws = AnalysisDataService::Instance().retrieveWS<ITableWorkspace>("TestWorkspace");
TS_ASSERT_EQUALS(ws->rowCount(), 4);
//Check the unselected rows were unaffected
TS_ASSERT_EQUALS(ws->String(0, RunCol), "13460");
TS_ASSERT_EQUALS(ws->String(3, RunCol), "13470");
TS_ASSERT_EQUALS(ws->String(0, RunCol), "12345");
TS_ASSERT_EQUALS(ws->String(3, RunCol), "24682");

//Check the group ids have been set correctly
TS_ASSERT_EQUALS(ws->Int(0, GroupCol), 3);
TS_ASSERT_EQUALS(ws->Int(1, GroupCol), 0);
TS_ASSERT_EQUALS(ws->Int(2, GroupCol), 2);
TS_ASSERT_EQUALS(ws->Int(0, GroupCol), 0);
TS_ASSERT_EQUALS(ws->Int(1, GroupCol), 2);
TS_ASSERT_EQUALS(ws->Int(2, GroupCol), 3);
TS_ASSERT_EQUALS(ws->Int(3, GroupCol), 1);

//Make sure the selected rows are clear
Expand Down

0 comments on commit 6c66253

Please sign in to comment.