#pragma once #include "domain/project_storage.h" #include #include namespace TestSupport { inline void require(bool condition, const std::string &message) { if (!condition) { throw std::runtime_error(message); } } // 编辑服务测试只验证内存模型和服务契约,不应依赖真实文件系统 class InMemoryProjectStorage final : public ProjectStorage { public: ProjectSaveResult save(const Project &, const std::string &) override { return {true, ProjectStorageError::None, {}}; } ProjectLoadResult load(const std::string &) override { return {false, {}, ProjectStorageError::FileReadFailed, {}}; } }; } // namespace TestSupport