MCPcopy Create free account
hub / github.com/Snapchat/Valdi / addMockedResponse

Method addMockedResponse

valdi/test/utils/RequestManagerMock.cpp:87–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 const auto& expectedRequest = mockedResponse.first;
86
87 if (request.url.hasSuffix(expectedRequest.url) && expectedRequest.method == request.method) {
88 const auto& response = mockedResponse.second;
89
90 return response;
91 }
92 }
93
94 return Valdi::Error(STRING_LITERAL("No mocked response for given request"));

Callers 5

registerAssetArchivesFunction · 0.80
TEST_FFunction · 0.80
TESTFunction · 0.80
addAssetArtifactFunction · 0.80
mockRemoteModuleMethod · 0.80

Calls 5

HTTPRequestInterface · 0.50
ValueInterface · 0.50
HTTPResponseClass · 0.50
asyncMethod · 0.45
lockMethod · 0.45

Tested by

no test coverage detected