#pragma once

#include <grove/IModule.h>
#include <string>
#include <nlohmann/json.hpp>

namespace celuna::testing {

/**
 * @brief Result of a test execution
 */
struct TestResult {
    bool passed = false;
    std::string testName;
    std::string message;
    int durationMs = 0;
    nlohmann::json details; // Additional test-specific data
};

/**
 * @brief Base interface for integration test modules
 *
 * All integration tests inherit from this interface.
 * Each test is a dynamically loaded module that executes
 * a specific scenario and returns a result.
 */
class ITestModule : public grove::IModule {
public:
    virtual ~ITestModule() = default;

    /**
     * @brief Execute the test
     * @return TestResult with pass/fail status and details
     */
    virtual TestResult execute() = 0;

    /**
     * @brief Get unique test name (e.g., "IT_001_GetCurrentTime")
     */
    virtual std::string getTestName() const = 0;

    /**
     * @brief Get human-readable test description
     */
    virtual std::string getDescription() const = 0;
};

} // namespace celuna::testing
