What will be the best way to write (google) test cases using a google mock object and expect the EXPECT_CALL() definitions being called from another thread controlled by the
So I liked these solutions, but thought it might be easier with a promise, I had to wait for my test to startup:
std::promise started;
EXPECT_CALL(mock, start_test())
.Times(1)
.WillOnce(testing::Invoke([&started]() {
started.set_value();
}));
system_->start();
EXPECT_EQ(std::future_status::ready, started.get_future().wait_for(std::chrono::seconds(3)));