| 147 | |
| 148 | |
| 149 | Try<Modules> getModulesFromJson( |
| 150 | const string& libraryName, |
| 151 | const string& moduleName, |
| 152 | const string& parameterKey, |
| 153 | const string& parameterValue) |
| 154 | { |
| 155 | string libraryFile = getModulePath(libraryName); |
| 156 | |
| 157 | string jsonString = |
| 158 | "{\n" |
| 159 | " \"libraries\": [\n" |
| 160 | " {\n" |
| 161 | " \"file\": \"" + libraryFile + "\",\n" |
| 162 | " \"modules\": [\n" |
| 163 | " {\n" |
| 164 | " \"name\": \"" + moduleName + "\",\n" |
| 165 | " \"parameters\": [\n" |
| 166 | " {\n" |
| 167 | " \"key\": \"" + parameterKey + "\",\n" |
| 168 | " \"value\": \"" + parameterValue + "\"\n" |
| 169 | " }\n" |
| 170 | " ]\n" |
| 171 | " }\n" |
| 172 | " ]\n" |
| 173 | " }\n" |
| 174 | " ]\n" |
| 175 | "}"; |
| 176 | |
| 177 | return flags::parse<Modules>(jsonString); |
| 178 | } |
| 179 | |
| 180 | |
| 181 | // Test that a module library gets loaded, and its contents |
no test coverage detected