Google Test fixture for running unit/integration tests against the VersionCommand.
More...
#include <IntVersionCommandTest.hxx>
|
|
void | SetUp () override |
| | Sets up the testing environment before each test.
|
|
void | TearDown () override |
| | Tears down the testing environment after each test.
|
| bool | containsMessage (const std::vector< Event > ¬ifications, const std::string &message) |
| | Checks if a specific message (substring) exists in any event notification.
|
| bool | containsExactMessage (const std::vector< Event > ¬ifications, const std::string &message) |
| | Checks if any event notification contains the exact specified message.
|
|
|
std::shared_ptr< MockSubject > | mockEventBus |
| | Shared pointer to the mock event bus for capturing command output.
|
|
std::unique_ptr< VersionCommand > | command |
| | Unique pointer to the command being tested.
|
Google Test fixture for running unit/integration tests against the VersionCommand.
This fixture provides the necessary infrastructure for testing the VersionCommand:
- SetUp/TearDown: Initialize and clean up the mock event bus and the command object.
- Core Components: Instances of MockSubject (for capturing output) and the VersionCommand itself.
- Helper Methods: Simplify checking the captured event notifications for specific content.
◆ containsExactMessage()
| bool svcs::test::cli::utils::VersionCommandTest::containsExactMessage |
( |
const std::vector< Event > & | notifications, |
|
|
const std::string & | message ) |
|
protected |
Checks if any event notification contains the exact specified message.
- Parameters
-
| notifications | The list of captured events. |
| message | The exact message to search for. |
- Returns
- true if an exact match is found, false otherwise.
◆ containsMessage()
| bool svcs::test::cli::utils::VersionCommandTest::containsMessage |
( |
const std::vector< Event > & | notifications, |
|
|
const std::string & | message ) |
|
protected |
Checks if a specific message (substring) exists in any event notification.
- Parameters
-
| notifications | The list of captured events. |
| message | The substring to search for. |
- Returns
- true if the message is found, false otherwise.
The documentation for this class was generated from the following files: