1
0
Fork 0
mirror of https://github.com/KingDuckZ/incredis synced 2024-11-27 00:43:50 +00:00
incredis/test/integration/redis_connection_fixture.hpp

28 lines
532 B
C++

#include <cstdint>
#include <string>
#include <memory>
namespace redis {
class IncRedis;
} //namespace redis
namespace incredis {
namespace test {
class RedisConnectionFixture {
public:
RedisConnectionFixture();
~RedisConnectionFixture() noexcept;
redis::IncRedis& incredis();
private:
bool use_socket_connection() const;
std::unique_ptr<redis::IncRedis> m_incredis;
std::string m_hostname;
std::string m_socket;
uint32_t m_db;
uint16_t m_port;
};
} //namespace test
} //namespac incredis