Browse Source

Apply naming convention to test variable values

Patrick-Christopher Mattulat 2 years ago
parent
commit
8b91940295

+ 4 - 4
test/cases/io/FileOutputStreamTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2023-02-05
+ * Changed:         2023-02-06
  *
  * */
 
@@ -35,7 +35,7 @@ namespace
 
   TEST_F(FileOutputStreamTest, constructor_file_does_not_exist)
   {
-    string path = TestHelper::getResourcesFolderLocation() + "not_existing.txt";
+    string path = TestHelper::getResourcesFolderLocation() + "not-existing.txt";
     File file{path};
 
     EXPECT_THROW(
@@ -54,7 +54,7 @@ namespace
 
   TEST_F(FileOutputStreamTest, write)
   {
-    string path = TestHelper::getResourcesFolderLocation() + "tmp_output_stream.txt";
+    string path = TestHelper::getResourcesFolderLocation() + "tmp-output-stream.txt";
     File file{path};
     file.createNewFile();
     ASSERT_TRUE(file.exists());
@@ -70,7 +70,7 @@ namespace
 
   TEST_F(FileOutputStreamTest, write_with_another_appending_stream)
   {
-    string path = TestHelper::getResourcesFolderLocation() + "tmp_output_stream.txt";
+    string path = TestHelper::getResourcesFolderLocation() + "tmp-output-stream.txt";
     File file{path};
     file.createNewFile();
     ASSERT_TRUE(file.exists());

+ 3 - 3
test/cases/io/FileReaderTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-18
- * Changed:         2023-02-05
+ * Changed:         2023-02-06
  *
  * */
 
@@ -36,7 +36,7 @@ namespace
 
   TEST_F(FileReaderTest, constructor_file_does_not_exist)
   {
-    File file{TestHelper::getResourcesFolderLocation() + "does_not_exist.txt"};
+    File file{TestHelper::getResourcesFolderLocation() + "does-not-exist.txt"};
 
     EXPECT_THROW(
         {
@@ -65,7 +65,7 @@ namespace
 
   TEST_F(FileReaderTest, read_file_gets_lost_in_between)
   {
-    File file{TestHelper::getResourcesFolderLocation() + "lost_readable_file.txt"};
+    File file{TestHelper::getResourcesFolderLocation() + "lost-readable-file.txt"};
     file.createNewFile();
     FileReader reader{file};
     file.remove();

+ 4 - 4
test/cases/io/FileTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-15
- * Changed:         2023-02-05
+ * Changed:         2023-02-06
  *
  * */
 
@@ -345,7 +345,7 @@ namespace
 
   TEST_F(FileTest, remove)
   {
-    string fileName = TestHelper::getResourcesFolderLocation() + "removable_file.txt";
+    string fileName = TestHelper::getResourcesFolderLocation() + "removable-file.txt";
     File file{fileName};
     file.createNewFile();
 
@@ -357,8 +357,8 @@ namespace
 
   TEST_F(FileTest, renameTo)
   {
-    string currentName = TestHelper::getResourcesFolderLocation() + "tmp_rename_to.txt";
-    string newName = TestHelper::getResourcesFolderLocation() + "tmp_rename_to_better_name.txt";
+    string currentName = TestHelper::getResourcesFolderLocation() + "tmp-rename-to.txt";
+    string newName = TestHelper::getResourcesFolderLocation() + "tmp-rename-to-better-name.txt";
 
     File file{currentName};
     file.createNewFile();

+ 5 - 5
test/cases/io/FileWriterTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2023-02-05
+ * Changed:         2023-02-06
  *
  * */
 
@@ -35,7 +35,7 @@ namespace
 
   TEST_F(FileWriterTest, constructor_file_does_not_exist)
   {
-    string path = TestHelper::getResourcesFolderLocation() + "not_existing_file.txt";
+    string path = TestHelper::getResourcesFolderLocation() + "not-existing-file.txt";
     File file{path};
 
     EXPECT_THROW(
@@ -54,7 +54,7 @@ namespace
 
   TEST_F(FileWriterTest, reset)
   {
-    string path = TestHelper::getResourcesFolderLocation() + "tmp_file_writer_test.txt";
+    string path = TestHelper::getResourcesFolderLocation() + "tmp-file-writer-test.txt";
     File file{path};
     file.createNewFile();
     FileWriter writer{file};
@@ -62,7 +62,7 @@ namespace
 
     // reset
 
-    path = TestHelper::getResourcesFolderLocation() + "tmp_file_writer_test2.txt";
+    path = TestHelper::getResourcesFolderLocation() + "tmp-file-writer-test2.txt";
     File anotherFile{path};
     anotherFile.createNewFile();
 
@@ -79,7 +79,7 @@ namespace
 
   TEST_F(FileWriterTest, write)
   {
-    string path = TestHelper::getResourcesFolderLocation() + "tmp_file_writer_test.txt";
+    string path = TestHelper::getResourcesFolderLocation() + "tmp-file-writer-test.txt";
     File file{path};
 
     ASSERT_FALSE(file.exists());

+ 2 - 2
test/cases/io/StorableFileTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-19
- * Changed:         2023-02-05
+ * Changed:         2023-02-06
  *
  * */
 
@@ -75,7 +75,7 @@ namespace
 
   TEST_F(StorableFileTest, save)
   {
-    string path = TestHelper::getResourcesFolderLocation() + "tmp_storable_file.txt";
+    string path = TestHelper::getResourcesFolderLocation() + "tmp-storable-file.txt";
     File file{path};
     file.createNewFile();
 

+ 3 - 3
test/cases/io/kv/KvFileReaderTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-12-25
- * Changed:         2023-02-05
+ * Changed:         2023-02-06
  *
  * */
 
@@ -64,7 +64,7 @@ namespace
         {
           try
           {
-            KvFileReader reader = KvFileReader(make_shared<KvDocument>(), "invalid_path");
+            KvFileReader reader = KvFileReader(make_shared<KvDocument>(), "invalid-path");
           }
           catch (const IllegalArgumentException &_exception)
           {
@@ -109,7 +109,7 @@ namespace
         {
           try
           {
-            reader->setFile(File{"invalid_path"});
+            reader->setFile(File{"invalid-path"});
           }
           catch (const IllegalArgumentException &_exception)
           {

+ 7 - 7
test/cases/io/logging/LoggerTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-20
- * Changed:         2023-02-05
+ * Changed:         2023-02-06
  *
  * */
 
@@ -79,7 +79,7 @@ namespace
   {
     // write to log file
 
-    string logName = "output_debug.log";
+    string logName = "output-debug.log";
     shared_ptr<IWriter> writer = createFileLogger(logName);
 
     Logger logger{writer};
@@ -108,7 +108,7 @@ namespace
   {
     // write to log file
 
-    string logName = "output_error.log";
+    string logName = "output-error.log";
     shared_ptr<IWriter> writer = createFileLogger(logName);
 
     Logger logger{writer};
@@ -137,7 +137,7 @@ namespace
   {
     // write to log file
 
-    string logName = "output_fatal.log";
+    string logName = "output-fatal.log";
     shared_ptr<IWriter> writer = createFileLogger(logName);
 
     Logger logger{writer};
@@ -172,7 +172,7 @@ namespace
   {
     // write to log file
 
-    string logName = "output_info.log";
+    string logName = "output-info.log";
     shared_ptr<IWriter> writer = createFileLogger(logName);
 
     Logger logger{writer};
@@ -209,7 +209,7 @@ namespace
   {
     // write to log file
 
-    string logName = "output_trace.log";
+    string logName = "output-trace.log";
     shared_ptr<IWriter> writer = createFileLogger(logName);
 
     Logger logger{writer};
@@ -238,7 +238,7 @@ namespace
   {
     // write to log file
 
-    string logName = "output_warn.log";
+    string logName = "output-warn.log";
     shared_ptr<IWriter> writer = createFileLogger(logName);
 
     Logger logger{writer};

+ 3 - 3
test/cases/io/xml/XmlParserTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-11-26
- * Changed:         2023-02-05
+ * Changed:         2023-02-06
  *
  * */
 
@@ -230,7 +230,7 @@ namespace
 
   TEST_F(XmlParserTest, getDocument)
   {
-    string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
+    string xmlPath = TestHelper::getResourcesFolderLocation() + "state-machine-test.xml";
     XmlParser xmlParser{make_shared<XmlDocument>()};
 
     ASSERT_TRUE(xmlParser.getDocument() != nullptr);
@@ -238,7 +238,7 @@ namespace
 
   TEST_F(XmlParserTest, setDocument)
   {
-    string xmlPath = TestHelper::getResourcesFolderLocation() + "state_machine_test.xml";
+    string xmlPath = TestHelper::getResourcesFolderLocation() + "state-machine-test.xml";
     shared_ptr<XmlDocument> document = make_shared<XmlDocument>();
     XmlParser xmlParser{document};
     ASSERT_TRUE(xmlParser.getDocument() == document);