@@ -103,12 +103,12 @@ class CTestPackageFile
103103 :m_packagePath(DefaultPackagePath / std::filesystem::path(" package.json" ))
104104 {
105105 // Create the package.json file
106- testCommon::filesystem ::writeFile (m_packagePath, content);
106+ test_common::Filesystem ::writeFile (m_packagePath, content);
107107 }
108108 virtual ~CTestPackageFile ()
109109 {
110110 // Clean-up
111- testCommon::filesystem ::removeFile (m_packagePath, false );
111+ test_common::Filesystem ::removeFile (m_packagePath, false );
112112 }
113113private:
114114 const std::filesystem::path m_packagePath;
@@ -117,7 +117,7 @@ class CTestPackageFile
117117BOOST_AUTO_TEST_CASE (ReadDefaultInformation)
118118{
119119 CTestPackageFile packageFile (DefaultPackageFileContent);
120- pluginSystem::CInformation info (testCommon::filesystem ::toBoost (DefaultPackagePath));
120+ pluginSystem::CInformation info (test_common::Filesystem ::toBoost (DefaultPackagePath));
121121
122122 BOOST_CHECK_EQUAL (info.getType (), " FakePackage" );
123123 BOOST_CHECK_EQUAL (info.getVersion ().toString (), " 0.0.1-beta" );
@@ -137,8 +137,8 @@ BOOST_AUTO_TEST_CASE(WrongPackageFileJsonFormat)
137137 " \" author\" : \" yadoms-team\" ,"
138138 " \" url\" : \" https://github.com/Yadoms/yadoms/\" ," ); // Closing brace is missing
139139
140- testCommon::filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContent);
141- BOOST_REQUIRE_THROW (pluginSystem::CInformation info (testCommon::filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
140+ test_common::Filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContent);
141+ BOOST_REQUIRE_THROW (pluginSystem::CInformation info (test_common::Filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
142142}
143143
144144BOOST_AUTO_TEST_CASE (NullOrEmptyPluginName)
@@ -152,8 +152,8 @@ BOOST_AUTO_TEST_CASE(NullOrEmptyPluginName)
152152 " \" author\" : \" yadoms-team\" ,"
153153 " \" url\" : \" https://github.com/Yadoms/yadoms/\" "
154154 " }" );
155- testCommon::filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithEmptyName);
156- BOOST_REQUIRE_THROW (pluginSystem::CInformation info (testCommon::filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
155+ test_common::Filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithEmptyName);
156+ BOOST_REQUIRE_THROW (pluginSystem::CInformation info (test_common::Filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
157157
158158 const std::string fileContentWithoutName (
159159 " {"
@@ -162,8 +162,8 @@ BOOST_AUTO_TEST_CASE(NullOrEmptyPluginName)
162162 " \" author\" : \" yadoms-team\" ,"
163163 " \" url\" : \" https://github.com/Yadoms/yadoms/\" "
164164 " }" );
165- testCommon::filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithoutName);
166- BOOST_REQUIRE_THROW (pluginSystem::CInformation info (testCommon::filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
165+ test_common::Filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithoutName);
166+ BOOST_REQUIRE_THROW (pluginSystem::CInformation info (test_common::Filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
167167}
168168
169169BOOST_AUTO_TEST_CASE (NullOrEmptyPluginDescription)
@@ -176,8 +176,8 @@ BOOST_AUTO_TEST_CASE(NullOrEmptyPluginDescription)
176176 " \" author\" : \" yadoms-team\" ,"
177177 " \" url\" : \" https://github.com/Yadoms/yadoms/\" "
178178 " }" );
179- testCommon::filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithEmptyDescription);
180- BOOST_REQUIRE_NO_THROW (pluginSystem::CInformation info (testCommon::filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )));
179+ test_common::Filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithEmptyDescription);
180+ BOOST_REQUIRE_NO_THROW (pluginSystem::CInformation info (test_common::Filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )));
181181
182182 const std::string fileContentWithoutDescription (
183183 " {"
@@ -186,8 +186,8 @@ BOOST_AUTO_TEST_CASE(NullOrEmptyPluginDescription)
186186 " \" author\" : \" yadoms-team\" ,"
187187 " \" url\" : \" https://github.com/Yadoms/yadoms/\" "
188188 " }" );
189- testCommon::filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithoutDescription);
190- BOOST_REQUIRE_NO_THROW (pluginSystem::CInformation info (testCommon::filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )));
189+ test_common::Filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithoutDescription);
190+ BOOST_REQUIRE_NO_THROW (pluginSystem::CInformation info (test_common::Filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )));
191191}
192192
193193BOOST_AUTO_TEST_CASE (BadPluginVersionFormat)
@@ -200,8 +200,8 @@ BOOST_AUTO_TEST_CASE(BadPluginVersionFormat)
200200 " \" author\" : \" yadoms-team\" ,"
201201 " \" url\" : \" https://github.com/Yadoms/yadoms/\" "
202202 " }" );
203- testCommon::filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithEmptyVersion);
204- BOOST_REQUIRE_THROW (pluginSystem::CInformation info (testCommon::filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
203+ test_common::Filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithEmptyVersion);
204+ BOOST_REQUIRE_THROW (pluginSystem::CInformation info (test_common::Filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
205205
206206 const std::string fileContentWithoutVersion (
207207 " {"
@@ -210,8 +210,8 @@ BOOST_AUTO_TEST_CASE(BadPluginVersionFormat)
210210 " \" author\" : \" yadoms-team\" ,"
211211 " \" url\" : \" https://github.com/Yadoms/yadoms/\" "
212212 " }" );
213- testCommon::filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithoutVersion);
214- BOOST_REQUIRE_THROW (pluginSystem::CInformation info (testCommon::filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
213+ test_common::Filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithoutVersion);
214+ BOOST_REQUIRE_THROW (pluginSystem::CInformation info (test_common::Filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
215215
216216 const std::string fileContentWithBadVersion1 (
217217 " {"
@@ -221,8 +221,8 @@ BOOST_AUTO_TEST_CASE(BadPluginVersionFormat)
221221 " \" author\" : \" yadoms-team\" ,"
222222 " \" url\" : \" https://github.com/Yadoms/yadoms/\" "
223223 " }" );
224- testCommon::filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithBadVersion1);
225- BOOST_REQUIRE_THROW (pluginSystem::CInformation info (testCommon::filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
224+ test_common::Filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithBadVersion1);
225+ BOOST_REQUIRE_THROW (pluginSystem::CInformation info (test_common::Filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
226226
227227 const std::string fileContentWithBadVersion2 (
228228 " {"
@@ -232,8 +232,8 @@ BOOST_AUTO_TEST_CASE(BadPluginVersionFormat)
232232 " \" author\" : \" yadoms-team\" ,"
233233 " \" url\" : \" https://github.com/Yadoms/yadoms/\" "
234234 " }" );
235- testCommon::filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithBadVersion2);
236- BOOST_REQUIRE_THROW (pluginSystem::CInformation info (testCommon::filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
235+ test_common::Filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithBadVersion2);
236+ BOOST_REQUIRE_THROW (pluginSystem::CInformation info (test_common::Filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
237237
238238 const std::string fileContentWithBadVersion3 (
239239 " {"
@@ -243,8 +243,8 @@ BOOST_AUTO_TEST_CASE(BadPluginVersionFormat)
243243 " \" author\" : \" yadoms-team\" ,"
244244 " \" url\" : \" https://github.com/Yadoms/yadoms/\" "
245245 " }" );
246- testCommon::filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithBadVersion3);
247- BOOST_REQUIRE_THROW (pluginSystem::CInformation info (testCommon::filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
246+ test_common::Filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithBadVersion3);
247+ BOOST_REQUIRE_THROW (pluginSystem::CInformation info (test_common::Filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
248248
249249 const std::string fileContentWithBadVersion4 (
250250 " {"
@@ -254,8 +254,8 @@ BOOST_AUTO_TEST_CASE(BadPluginVersionFormat)
254254 " \" author\" : \" yadoms-team\" ,"
255255 " \" url\" : \" https://github.com/Yadoms/yadoms/\" "
256256 " }" );
257- testCommon::filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithBadVersion4);
258- BOOST_REQUIRE_THROW (pluginSystem::CInformation info (testCommon::filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
257+ test_common::Filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithBadVersion4);
258+ BOOST_REQUIRE_THROW (pluginSystem::CInformation info (test_common::Filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
259259}
260260
261261BOOST_AUTO_TEST_CASE (NullOrEmptyPluginAuthor)
@@ -268,8 +268,8 @@ BOOST_AUTO_TEST_CASE(NullOrEmptyPluginAuthor)
268268 " \" author\" : \"\" ,"
269269 " \" url\" : \" https://github.com/Yadoms/yadoms/\" "
270270 " }" );
271- testCommon::filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithEmptyAuthor);
272- BOOST_REQUIRE_THROW (pluginSystem::CInformation info (testCommon::filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
271+ test_common::Filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithEmptyAuthor);
272+ BOOST_REQUIRE_THROW (pluginSystem::CInformation info (test_common::Filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
273273
274274 const std::string fileContentWithoutAuthor (
275275 " {"
@@ -278,8 +278,8 @@ BOOST_AUTO_TEST_CASE(NullOrEmptyPluginAuthor)
278278 " \" version\" : \" 0.1.0-beta\" ,"
279279 " \" url\" : \" https://github.com/Yadoms/yadoms/\" "
280280 " }" );
281- testCommon::filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithoutAuthor);
282- BOOST_REQUIRE_THROW (pluginSystem::CInformation info (testCommon::filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
281+ test_common::Filesystem ::createFile (std::filesystem::temp_directory_path () / " FakePackage" / " package.json" , fileContentWithoutAuthor);
282+ BOOST_REQUIRE_THROW (pluginSystem::CInformation info (test_common::Filesystem ::toBoost (std::filesystem::temp_directory_path () / " FakePackage" )), shared::exception::CInvalidParameter);
283283}
284284
285285BOOST_AUTO_TEST_SUITE_END ()
0 commit comments