| 538 | |
| 539 | template <typename PID, typename Method> |
| 540 | Future<Nothing> FutureDispatch(PID pid, Method method, bool drop = false) |
| 541 | { |
| 542 | TestsFilter* filter = FilterTestEventListener::instance()->install(); |
| 543 | Future<Nothing> future; |
| 544 | synchronized (filter->mutex) { |
| 545 | EXPECT_CALL(filter->mock, filter(pid, testing::A<const DispatchEvent&>())) |
| 546 | .With(DispatchMatcher(method)) |
| 547 | .WillOnce(testing::DoAll(FutureSatisfy(&future), |
| 548 | testing::Return(drop))) |
| 549 | .RetiresOnSaturation(); // Don't impose any subsequent expectations. |
| 550 | } |
| 551 | |
| 552 | return future; |
| 553 | } |
| 554 | |
| 555 | |
| 556 | template <typename Name, typename From, typename To> |
nothing calls this directly
no test coverage detected