/*
* Author:          Patrick-Christopher Mattulat
* Co-Author:       Claude Sonnet 4.6 (LLM)
* Company:         Lynar Studios
* E-Mail:          webmaster@lynarstudios.com
* Created:         2023-05-23
* Changed:         2026-06-23
*
* */

#include <gtest/gtest.h>
#include <ls-std/ls-std-core.hpp>

using ls::standard::core::IllegalArgumentException;
using ls::standard::core::RawNullPointerArgumentEvaluator;
using ls::standard::core::type::RawPointer;
using std::string;
using testing::Test;

namespace
{
  class RawNullPointerArgumentEvaluatorTest : public Test
  {
    public:

      RawNullPointerArgumentEvaluatorTest() = default;
      ~RawNullPointerArgumentEvaluatorTest() override = default;
  };

  TEST_F(RawNullPointerArgumentEvaluatorTest, evaluate_raw_pointer)
  {
    EXPECT_THROW(
        {
          try
          {
            RawNullPointerArgumentEvaluator<void>{RawPointer<void>{nullptr}}.evaluate();
          }
          catch (const IllegalArgumentException &_exception)
          {
            const string actual = _exception.what();
            const string expected = _exception.getName() + " thrown - passed argument is null!";

            ASSERT_STREQ(expected.c_str(), actual.c_str());
            throw;
          }
        },
        IllegalArgumentException);
  }
}
