Refactor out ResponseCapturer and place it in a shared location. |
||
Issue descriptionWhen writing tests that involve the usage of an async dbus api, it is non-trivial to extract and inspect the response from the related callback since the object used for the response is passed as a unique_ptr and hence ownership cannot be retained. A solution was implemented and copied over in other tests here: https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/login_manager/session_manager_impl_unittest.cc#236 Since this is a fairly useful mechanism for testing, it needs to be refactored out and placed in a shared location.
,
Aug 6
Eventually, we designed the tests to avoid leaking the implementation details related to dbus. As a result we were able to get rid of the ResponseCapture class in favor of a simple callback. |
||
►
Sign in to add a comment |
||
Comment 1 by benhenry@chromium.org
, Aug 3