How can i call my mock method two times with two different argument value

Multi tool use
up vote
0
down vote
favorite
Suppose I have to test the mock method GetSegment with exclusive value 0 and 1(two times).
EXPECT_CALL(*mock.get(), GetSegment(refrenceId, _, _, _)).
WillOnce(DoAll(SetArgReferee<1>(numSegment), SetArgPointee<2>(points), SetArgPointee<3>(**exclusive**)));
Thanks,
c++ googletest googlemock gmock
New contributor
Abhi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
0
down vote
favorite
Suppose I have to test the mock method GetSegment with exclusive value 0 and 1(two times).
EXPECT_CALL(*mock.get(), GetSegment(refrenceId, _, _, _)).
WillOnce(DoAll(SetArgReferee<1>(numSegment), SetArgPointee<2>(points), SetArgPointee<3>(**exclusive**)));
Thanks,
c++ googletest googlemock gmock
New contributor
Abhi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Suppose I have to test the mock method GetSegment with exclusive value 0 and 1(two times).
EXPECT_CALL(*mock.get(), GetSegment(refrenceId, _, _, _)).
WillOnce(DoAll(SetArgReferee<1>(numSegment), SetArgPointee<2>(points), SetArgPointee<3>(**exclusive**)));
Thanks,
c++ googletest googlemock gmock
New contributor
Abhi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Suppose I have to test the mock method GetSegment with exclusive value 0 and 1(two times).
EXPECT_CALL(*mock.get(), GetSegment(refrenceId, _, _, _)).
WillOnce(DoAll(SetArgReferee<1>(numSegment), SetArgPointee<2>(points), SetArgPointee<3>(**exclusive**)));
Thanks,
c++ googletest googlemock gmock
c++ googletest googlemock gmock
New contributor
Abhi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Abhi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 2 days ago


ACupOfBreadTea
195
195
New contributor
Abhi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 2 days ago
Abhi
11
11
New contributor
Abhi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Abhi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Abhi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Abhi is a new contributor. Be nice, and check out our Code of Conduct.
draft saved
draft discarded
Abhi is a new contributor. Be nice, and check out our Code of Conduct.
Abhi is a new contributor. Be nice, and check out our Code of Conduct.
Abhi is a new contributor. Be nice, and check out our Code of Conduct.
draft saved
draft discarded
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53238299%2fhow-can-i-call-my-mock-method-two-times-with-two-different-argument-value%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
q5U1T1xKtJwdDLQP,iae,nOBLPhdpl8f ylK9A,CTTuwhrlR2Nw61bjR5LJtFnK49AEldqTCJfjJECEujZQ,mo1xZD3MUSDpjtM