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

#include "MockFileExistenceEvaluator.hpp"
#include <ls-std/core/exception/FileNotFoundException.hpp>
#include <string>

using ls::standard::core::Class;
using ls::standard::core::FileNotFoundException;
using std::string;
using test::io::MockFileExistenceEvaluator;

MockFileExistenceEvaluator::MockFileExistenceEvaluator(const bool _fileExists) : Class("MockFileExistenceEvaluator"), fileExists(_fileExists)
{}

MockFileExistenceEvaluator::~MockFileExistenceEvaluator() noexcept = default;

void MockFileExistenceEvaluator::evaluate()
{
  if (!this->fileExists)
  {
    const string message = this->getClassName() + " called - this is just a simulation!";
    throw FileNotFoundException{message};
  }
}
