14 #include <gtest/gtest.h> 18 #ifndef TEST_CORE_CONFIG_PATH 19 #define TEST_CORE_CONFIG_PATH "./tests/core/configs/" 32 EXPECT_EQ(standaloneParams[0].Name,
"param1");
34 EXPECT_EQ(standaloneParams[1].Name,
"param2");
35 EXPECT_EQ(standaloneParams[1].Value,
"value2");
37 const std::vector<Common::ParametersGroup> standaloneGroups = config.
Parameters.
Groups;
39 ASSERT_EQ(standaloneGroups[0].Name,
"group1");
40 const std::vector<Common::Parameter> group1Params = standaloneGroups[0].Parameters;
42 ASSERT_EQ(group1Params[0].Name,
"param1");
43 ASSERT_EQ(group1Params[0].Value,
"value1");
44 ASSERT_EQ(group1Params[1].Name,
"param2");
45 ASSERT_EQ(group1Params[1].Value,
"value2");
47 ASSERT_EQ(standaloneGroups[1].Name,
"group2");
48 const std::vector<Common::Parameter> group2Params = standaloneGroups[1].Parameters;
50 ASSERT_EQ(group2Params[0].Name,
"param1");
51 ASSERT_EQ(group2Params[0].Value,
"value1");
52 ASSERT_EQ(group2Params[1].Name,
"param2");
53 ASSERT_EQ(group2Params[1].Value,
"value2");
79 addon.
Id =
"test_addon";
98 ASSERT_EQ(module.Parameters.Parameters.size(), 1);
99 ASSERT_EQ(module.Parameters.Parameters[0].Name,
"parameter");
100 ASSERT_EQ(module.Parameters.Parameters[0].Value,
"value");
101 ASSERT_EQ(module.Parameters.Groups.size(), 1);
102 ASSERT_EQ(module.Parameters.Groups[0].Name,
"group");
103 ASSERT_EQ(module.Parameters.Groups[0].Parameters.size(), 1);
104 ASSERT_EQ(module.Parameters.Groups[0].Parameters[0].Name,
"parameter");
105 ASSERT_EQ(module.Parameters.Groups[0].Parameters[0].Value,
"value");
Configuration ParseConfigurationFiles(const std::string &directory)
Configuration ParseConfiguration(const std::string &configPath)
void SaveConfiguration(const ModulesConfiguration &configuration, const std::string &configPath)
std::vector< AddonId > Dependencies
std::vector< Parameter > Parameters
#define TEST_CORE_CONFIG_PATH
Common::AddonParameters Parameters
bool Value(const T &value, M matcher)
TEST(GTestEnvVarTest, Dummy)
const char * TestConfigFile
const char * TestConfigPath
#define ASSERT_EQ(val1, val2)
std::vector< ParametersGroup > Groups
AddonParameters Parameters
std::vector< Common::ModuleConfiguration > ModulesConfiguration
std::vector< ModuleConfiguration > Modules
#define EXPECT_EQ(expected, actual)
std::vector< Parameter > Parameters