I have to following mocked functions
DoSomething(const char* par0, const char* par2)
DoSomething2(std::string);
I save the value from DoSomething into
std::string savedPar_;
I want to use it in DoSomething2. How can be done this ?
EXPECT_CALL(mockd_, DoSomething(_, _,))
.WillOnce(DoAll(SaveArg<1>(&savedPar_), (Return(Ok))));
EXPECT_CALL(mockd_, DoSomething2(savedPar_,))
.WillOnce((Return(Ok))));
// has not yet the val
sut_->work();
// savedPar_ has the value