27#include <gtest/gtest.h>
82 void SetUp()
override;
106 void createTestFile(
const std::string& filename,
const std::string& content);
130 void stageFiles(
const std::vector<std::string>& files);
145 bool containsMessage(
const std::vector<Event>& notifications,
const std::string& message);
172 std::unique_ptr<RemoveCommand>
command;
Declaration of the RemoveCommand class for removing files from staging area.
Command for removing files from the staging area.
Definition RemoveCommand.hxx:37
Manages all physical file and directory operations within the SVCS repository.
Definition RepositoryManager.hxx:83
A mock implementation of ISubject for testing event-driven components.
Definition MockSubject.hxx:43
Google Test fixture for running integration tests against the RemoveCommand.
Definition IntRemoveCommandTest.hxx:49
bool containsMessage(const std::vector< Event > ¬ifications, const std::string &message)
Checks if a specific message (substring) exists in any event notification.
Definition IntRemoveCommandTest.cxx:67
void createTestFile(const std::string &filename, const std::string &content)
Creates a test file with specified content in the temporary directory.
Definition IntRemoveCommandTest.cxx:51
void createTestDirectory(const std::string &dirname)
Creates a test directory in the temporary location.
Definition IntRemoveCommandTest.cxx:57
void SetUp() override
Sets up the testing environment before each test.
Definition IntRemoveCommandTest.cxx:22
std::shared_ptr< RepositoryManager > repoManager
Shared pointer to the repository core logic component.
Definition IntRemoveCommandTest.hxx:107
std::shared_ptr< MockSubject > mockEventBus
Shared pointer to the mock event bus (observer).
Definition IntRemoveCommandTest.hxx:101
std::filesystem::path testDir
Path to the temporary test repository directory.
Definition IntRemoveCommandTest.hxx:119
void stageFiles(const std::vector< std::string > &files)
Stages a list of files (using the add command logic for convenience) in the RepositoryManager's stagi...
Definition IntRemoveCommandTest.cxx:61
void TearDown() override
Tears down the testing environment after each test.
Definition IntRemoveCommandTest.cxx:45
std::unique_ptr< RemoveCommand > command
Unique pointer to the command being tested.
Definition IntRemoveCommandTest.hxx:113
Mock implementation of the ISubject interface for unit testing purposes.
Utility classes and test fixtures for CLI command testing.
Definition ClearCommandTest.cxx:17
Structure describing an event published by the VCS core.
Definition Event.hxx:30