SVCS - English Documentation
Loading...
Searching...
No Matches
IntAddCommandTest.hxx
1
17
18#pragma once
19
23
24#include <gtest/gtest.h>
25
41namespace svcs::test::cli::utils {
42
43using namespace svcs::test::cli::mocks;
44
45using namespace svcs::core;
46using namespace svcs::cli;
47using namespace svcs::services;
48
66class AddCommandTest : public ::testing::Test {
67protected:
75 std::shared_ptr<MockSubject> mockEventBus;
76
84 std::shared_ptr<RepositoryManager> repoManager;
85
93 std::unique_ptr<AddCommand> command;
94
102 std::filesystem::path testDir;
103
115 void SetUp() override;
116
126 void TearDown() override;
127
139 void createTestFile(const std::string& filename, const std::string& content = "test content") const;
140
150 void createTestDirectory(const std::string& dirname) const;
151};
152
153}
Declaration of the AddCommand class.
Declaration of the RepositoryManager class, managing all repository-level file operations.
Test fixture for AddCommand integration tests.
Definition IntAddCommandTest.hxx:46
std::shared_ptr< MockSubject > mockEventBus
Mock event bus for capturing system notifications.
Definition IntAddCommandTest.hxx:52
std::filesystem::path testDir
Path to the temporary directory used as the repository root.
Definition IntAddCommandTest.hxx:70
void createTestFile(const std::string &filename, const std::string &content="test content") const
Creates a test file inside the test directory.
Definition IntAddCommandTest.cxx:49
void createTestDirectory(const std::string &dirname) const
Creates a test directory inside the test directory.
Definition IntAddCommandTest.cxx:55
void SetUp() override
Sets up the test environment.
Definition IntAddCommandTest.cxx:25
std::shared_ptr< RepositoryManager > repoManager
Real RepositoryManager instance under test.
Definition IntAddCommandTest.hxx:58
void TearDown() override
Tears down the test environment.
Definition IntAddCommandTest.cxx:43
std::unique_ptr< AddCommand > command
AddCommand instance under test.
Definition IntAddCommandTest.hxx:64
Mock implementation of the ISubject interface for unit testing purposes.
Command-line interface components and command implementations.
Service layer components and infrastructure services.
Utility classes and test fixtures for CLI command testing.
Definition ClearCommandTest.cxx:17