Skip to content

Commit

Permalink
Refs #7849. Fixing test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Reuter committed Aug 30, 2013
1 parent c3449b2 commit f231055
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ static std::string constructXML(std::string nbinsA, std::string nbinsB, std::str
MockGeometryView gView;
EXPECT_CALL(gView, getDimensionViewFactory()).WillOnce(ReturnRef(factory));
EXPECT_CALL(gView, addDimensionView(_)).Times(5);
EXPECT_CALL(gView, getBinDisplayMode()).Times(1).WillOnce(Return(Simple));

MDGeometryXMLParser parser(constructXML());
parser.execute();
Expand Down Expand Up @@ -211,6 +212,7 @@ static std::string constructXML(std::string nbinsA, std::string nbinsB, std::str

NiceMock<MockGeometryView> gView;
EXPECT_CALL(gView, getDimensionViewFactory()).WillRepeatedly(ReturnRef(factory));
EXPECT_CALL(gView, getBinDisplayMode()).Times(1).WillOnce(Return(Simple));

MDGeometryXMLParser parser(constructXML());
parser.execute();
Expand All @@ -234,6 +236,7 @@ static std::string constructXML(std::string nbinsA, std::string nbinsB, std::str

NiceMock<MockGeometryView> gView;
EXPECT_CALL(gView, getDimensionViewFactory()).WillRepeatedly(ReturnRef(factory));
EXPECT_CALL(gView, getBinDisplayMode()).Times(1).WillOnce(Return(Simple));

MDGeometryXMLParser parser(constructXML());
parser.execute();
Expand Down Expand Up @@ -268,7 +271,7 @@ static std::string constructXML(std::string nbinsA, std::string nbinsB, std::str

NiceMock<MockGeometryView> gView;
EXPECT_CALL(gView, getDimensionViewFactory()).WillRepeatedly(ReturnRef(factory));
EXPECT_CALL(gView, getBinDisplayMode()).Times(1).WillOnce(Return(Simple)); //Will return (SIMPLE) the same Mode as the original, so nothing should happen.
EXPECT_CALL(gView, getBinDisplayMode()).Times(2).WillRepeatedly(Return(Simple)); //Will return (SIMPLE) the same Mode as the original, so nothing should happen.

MDGeometryXMLParser parser(constructXML());
parser.execute();
Expand All @@ -294,7 +297,7 @@ static std::string constructXML(std::string nbinsA, std::string nbinsB, std::str

NiceMock<MockGeometryView> gView;
EXPECT_CALL(gView, getDimensionViewFactory()).WillRepeatedly(ReturnRef(factory));
EXPECT_CALL(gView, getBinDisplayMode()).Times(1).WillOnce(Return(LowHighStep)); //Will return (LowHighStep) a different Mode to the original.
EXPECT_CALL(gView, getBinDisplayMode()).Times(2).WillOnce(Return(Simple)).WillOnce(Return(LowHighStep)); //Will return (LowHighStep) a different Mode to the original.

MDGeometryXMLParser parser(constructXML());
parser.execute();
Expand All @@ -320,7 +323,7 @@ static std::string constructXML(std::string nbinsA, std::string nbinsB, std::str

NiceMock<MockGeometryView> gView;
EXPECT_CALL(gView, getDimensionViewFactory()).WillRepeatedly(ReturnRef(factory));
EXPECT_CALL(gView, getBinDisplayMode()).Times(2).WillRepeatedly(Return(LowHighStep)); //Will return (LowHighStep) a different Mode to the original.
EXPECT_CALL(gView, getBinDisplayMode()).Times(3).WillOnce(Return(Simple)).WillRepeatedly(Return(LowHighStep)); //Will return (LowHighStep) a different Mode to the original.

MDGeometryXMLParser parser(constructXML());
parser.execute();
Expand Down

0 comments on commit f231055

Please sign in to comment.