proxygen
TestUtils.h File Reference
#include <folly/portability/GTest.h>
#include <proxygen/lib/http/codec/test/MockHTTPCodec.h>
#include <proxygen/lib/utils/TestUtils.h>
#include <boost/optional/optional_io.hpp>

Go to the source code of this file.

Classes

class  proxygen::FakeHTTPCodecCallback
 

Namespaces

 proxygen
 

Functions

template<class T >
size_t proxygen::parse (T *codec, const uint8_t *inputData, uint32_t length, int32_t atOnce=0, std::function< bool()> stopFn=[]{return false;})
 
template<class T >
size_t proxygen::parseUnidirectional (T *codec, const uint8_t *inputData, uint32_t length, int32_t atOnce=0, std::function< bool()> stopFn=[]{return false;})
 
 proxygen::MATCHER_P (PtrBufHasLen, n,"")
 
std::unique_ptr< HTTPMessage > proxygen::getPriorityMessage (uint8_t priority)
 
std::unique_ptr< folly::IOBufproxygen::makeBuf (uint32_t size)
 
std::unique_ptr< testing::NiceMock< MockHTTPCodec > > proxygen::makeDownstreamParallelCodec ()
 
std::unique_ptr< testing::NiceMock< MockHTTPCodec > > proxygen::makeUpstreamParallelCodec ()
 
HTTPMessage proxygen::getGetRequest (const std::string &url)
 
HTTPMessage proxygen::getBigGetRequest (const std::string &url)
 
HTTPMessage proxygen::getPostRequest (uint32_t contentLength)
 
HTTPMessage proxygen::getPubRequest (const std::string &url)
 
HTTPMessage proxygen::getChunkedPostRequest ()
 
HTTPMessage proxygen::getResponse (uint32_t code, uint32_t bodyLen)
 
HTTPMessage proxygen::getUpgradeRequest (const std::string &upgradeHeader, HTTPMethod method, uint32_t bodyLen)
 
std::unique_ptr< HTTPMessage > proxygen::makeGetRequest ()
 
std::unique_ptr< HTTPMessage > proxygen::makePostRequest (uint32_t contentLength)
 
std::unique_ptr< HTTPMessage > proxygen::makeResponse (uint16_t statusCode)
 
std::tuple< std::unique_ptr< HTTPMessage >, std::unique_ptr< folly::IOBuf > > proxygen::makeResponse (uint16_t statusCode, size_t len)
 
void proxygen::fakeMockCodec (MockHTTPCodec &codec)