MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / onSetup

Method onSetup

Tests/Libraries/Http/HttpAsyncClientTest.cpp:1430–1442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1428 {
1429 setupCompleted = true;
1430 completeTransport(Result(true));
1431 }
1432 } ctx;
1433
1434 ctx.test = this;
1435 ctx.collector = &collector;
1436 ctx.server = &httpServer;
1437
1438 httpServer.onRequest = [this, &ctx](HttpConnection& connection)
1439 {
1440 ctx.requestAfterSetup = ctx.setupCompleted;
1441 SC_TEST_EXPECT(connection.response.startResponse(200));
1442 SC_TEST_EXPECT(connection.response.addHeader("Content-Length", "5"));
1443 SC_TEST_EXPECT(connection.response.sendHeaders());
1444 SC_TEST_EXPECT(connection.response.getWritableStream().write("ready"));
1445 SC_TEST_EXPECT(connection.response.end());

Calls 5

recordExpectationMethod · 0.80
ResultClass · 0.50
ErrorEnum · 0.50
isValidMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected