SectionPairFileReaderParameterTest.cpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-02-21
  6. * Changed: 2023-02-21
  7. *
  8. * */
  9. #include <gtest/gtest.h>
  10. #include <ls-std/ls-std-io.hpp>
  11. using namespace ls::std::io;
  12. using namespace ::std;
  13. namespace
  14. {
  15. class SectionPairFileReaderParameterTest : public ::testing::Test
  16. {
  17. protected:
  18. SectionPairFileReaderParameterTest() = default;
  19. ~SectionPairFileReaderParameterTest() override = default;
  20. void SetUp() override
  21. {}
  22. void TearDown() override
  23. {}
  24. };
  25. TEST_F(SectionPairFileReaderParameterTest, getDocument)
  26. {
  27. ASSERT_TRUE(SectionPairFileReaderParameter{}.getDocument() == nullptr);
  28. }
  29. TEST_F(SectionPairFileReaderParameterTest, getFilePath)
  30. {
  31. ASSERT_TRUE(SectionPairFileReaderParameter{}.getFilePath().empty());
  32. }
  33. TEST_F(SectionPairFileReaderParameterTest, getReader)
  34. {
  35. ASSERT_TRUE(SectionPairFileReaderParameter{}.getReader() == nullptr);
  36. }
  37. TEST_F(SectionPairFileReaderParameterTest, setDocument)
  38. {
  39. SectionPairFileReaderParameter parameter{};
  40. parameter.setDocument(make_shared<SectionPairDocument>());
  41. ASSERT_FALSE(parameter.getDocument() == nullptr);
  42. }
  43. TEST_F(SectionPairFileReaderParameterTest, setFilePath)
  44. {
  45. SectionPairFileReaderParameter parameter{};
  46. parameter.setFilePath("var/log/log.txt");
  47. ASSERT_FALSE(parameter.getFilePath().empty());
  48. }
  49. }