From: Manuel Nickschas Date: Thu, 4 Oct 2018 17:03:02 +0000 (+0200) Subject: test: Add a way to mock peers for SignalProxy-related test cases X-Git-Tag: test-travis-01~110 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=7dee6df30bc997b3045ec0e20cdefdf8a70ba93e;hp=7dee6df30bc997b3045ec0e20cdefdf8a70ba93e test: Add a way to mock peers for SignalProxy-related test cases Introduce a new mock class MockedPeer that allows for setting expectations for dispatched Quassel protocol messages. Also provide matchers to express such expectations in a straightforward way. MockedPeer for now only supports SignalProxy messages; support for authentication messages can be added later if needed. Note that expectations can be set on the level of protocol messages, but things like a testing a particular serialization, the use of network sockets, or other lower-level implementation details are not supported, nor is MockedPeer intended for such use cases (we'd expect specific tests for specific peer types). ---