| 107 | auto weakThis = weak_from_this(); |
| 108 | _queue->async([=]() { |
| 109 | auto strongThis = weakThis.lock(); |
| 110 | if (strongThis != nullptr) { |
| 111 | strongThis->_mockedSuffixResponses.emplace_back(request, response); |
| 112 | } |
| 113 | }); |
| 114 | } |
| 115 | |
| 116 | void RequestManagerMock::addMockedResponse(const snap::valdi_core::HTTPRequest& request, |
| 117 | const snap::valdi_core::HTTPResponse& response) { |
| 118 | addMockedResponse(request, Result<snap::valdi_core::HTTPResponse>(response)); |
| 119 | } |
| 120 | |
| 121 | void RequestManagerMock::addMockedResponse(const snap::valdi_core::HTTPRequest& request, |
| 122 | const Result<snap::valdi_core::HTTPResponse>& response) { |
| 123 | auto weakThis = weak_from_this(); |
| 124 | _queue->async([=]() { |
| 125 | auto strongThis = weakThis.lock(); |
| 126 | if (strongThis != nullptr) { |
| 127 | strongThis->_mockedResponses.emplace_back(request, response); |
| 128 | } |
| 129 | }); |
nothing calls this directly
no test coverage detected