34#include <gmock/gmock.h>
43 config.
data[
"key1"] =
"value1";
44 config.
data[
"key2"] =
"value2";
53 config.
data[
"key1"] =
"value1";
61 config.
data[
"key1"] =
"value1";
62 config.
data[
"key2"] =
"1234";
71 config.
data[
"key1"] =
"value1";
79 config.
data[
"key1"] =
"1, 2, 3";
80 config.
data[
"key2"] =
"4; 5; 6";
82 std::vector<int> v1 = config.
getVector<
int>(
"key1");
83 std::vector<int> v2 = config.
getVector<
int>(
"key2");
99 config.
data[
"key1"] =
"1, 2, 3";
107 config.
data[
"key1"] =
"value1";
118 config.
data[
"key1"] =
"42";
129 config.
data[
"key1"] =
"true";
130 config.
data[
"key2"] =
"false";
142 config.
data[
"key1"] =
"text";
150 config.
data[
"key1"] =
"value1";
151 config.
data[
"key2"] =
"value2";
std::vector< T > getVector(const std::string &key) const
get vector with key
std::map< std::string, std::string > data
the container is public to test this class
bool contains(const std::string &key) const
check if value associated with given key exists
void clear()
clear all values
T getValue(const std::string &key) const
get value with key
std::shared_ptr< T > SPtr
TEST(ConfigurationFileTest, ContainsReturnsTrueForExistingKey)
Simple configuration file.