9#include "MantidCatalog/ONCat.h"
16using Mantid::Catalog::OAuth::IOAuthTokenStore;
17using Mantid::Catalog::OAuth::IOAuthTokenStore_uptr;
18using Mantid::Catalog::OAuth::OAuthToken;
19using Mantid::Catalog::ONCat::ONCat;
24namespace FrameworkTestHelpers {
26using MockResponseMap = std::map<std::string, std::pair<InternetHelper::HTTPStatus, std::string>>;
56 void setToken(
const boost::optional<OAuthToken> &token)
override;
57 boost::optional<OAuthToken>
getToken()
override;
bool allResponsesCalled() const
MockResponseMap m_responseMap
bool allResponsesCalledOnce() const
InternetHelper::HTTPStatus sendHTTPSRequest(const std::string &url, std::ostream &responseStream) override
Performs a request using https.
MockResponseCallCounts m_responseCallCounts
InternetHelper::HTTPStatus sendHTTPRequest(const std::string &url, std::ostream &responseStream) override
Performs a request using http.
void setToken(const boost::optional< OAuthToken > &token) override
boost::optional< OAuthToken > m_token
boost::optional< OAuthToken > getToken() override
Exception thrown when error occurs accessing an internet resource.
InternetHelper : A helper class for supporting access to resources through HTTP and HTTPS.
std::shared_ptr< MockONCatAPI > make_mock_oncat_api(const MockResponseMap &responseMap)
std::map< std::string, unsigned int > MockResponseCallCounts
std::map< std::string, std::pair< InternetHelper::HTTPStatus, std::string > > MockResponseMap
IOAuthTokenStore_uptr make_mock_token_store()
std::unique_ptr< ONCat > make_oncat_with_mock_api(const std::shared_ptr< MockONCatAPI > &mockAPI)
std::pair< const std::basic_string< char >, unsigned int > MockResponseCallMapping
IOAuthTokenStore_uptr make_mock_token_store_already_logged_in()
Helper class which provides the Collimation Length for SANS instruments.