Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove 'Subsystem' from test file names and class names
Rename test files and classes by removing 'Subsystem' from names:
- PublishingSubsystemTests.cs -> PublishingTests.cs
- CliSubsystemTests.cs -> CliTests.cs
- CaptureSubsystemTests.cs -> CaptureTests.cs
- SelfTestSubsystemTests.cs -> SelfTestTests.cs
- ConfigurationLoadSubsystemTests.cs -> ConfigurationLoadTests.cs
- ConfigurationSubsystemTests.cs -> ConfigurationTests.cs

Update class names and method name prefixes accordingly.
Update .reviewmark.yaml file path references to match new names.

Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
  • Loading branch information
Copilot and Malcolmnixon authored Apr 7, 2026
commit bd331e85a9a8b9db47d821d2151041c3ed91121c
14 changes: 7 additions & 7 deletions .reviewmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ reviews:
paths:
- "docs/reqstream/version-mark/cli/cli.yaml" # subsystem requirements
- "docs/design/version-mark/cli/cli.md" # subsystem design
- "test/**/Cli/CliSubsystemTests.cs" # subsystem tests
- "test/**/Cli/CliTests.cs" # subsystem tests

- id: VersionMark-Cli-Program
title: Review that VersionMark Cli Program Implementation is Correct
Expand All @@ -87,8 +87,8 @@ reviews:
paths:
- "docs/reqstream/version-mark/configuration/configuration.yaml" # subsystem requirements
- "docs/design/version-mark/configuration/configuration.md" # subsystem design
- "test/**/Configuration/ConfigurationSubsystemTests.cs" # subsystem tests
- "test/**/Configuration/ConfigurationLoadSubsystemTests.cs" # load subsystem tests
- "test/**/Configuration/ConfigurationTests.cs" # subsystem tests
- "test/**/Configuration/ConfigurationLoadTests.cs" # load subsystem tests

- id: VersionMark-Configuration-VersionMarkConfig
title: Review that VersionMark Configuration VersionMarkConfig Implementation is Correct
Expand Down Expand Up @@ -121,7 +121,7 @@ reviews:
paths:
- "docs/reqstream/version-mark/capture/capture.yaml" # subsystem requirements
- "docs/design/version-mark/capture/capture.md" # subsystem design
- "test/**/Capture/CaptureSubsystemTests.cs" # subsystem tests
- "test/**/Capture/CaptureTests.cs" # subsystem tests

- id: VersionMark-Capture-VersionInfo
title: Review that VersionMark Capture VersionInfo Implementation is Correct
Expand All @@ -137,7 +137,7 @@ reviews:
paths:
- "docs/reqstream/version-mark/publishing/publishing.yaml" # subsystem requirements
- "docs/design/version-mark/publishing/publishing.md" # subsystem design
- "test/**/Publishing/PublishingSubsystemTests.cs" # subsystem tests
- "test/**/Publishing/PublishingTests.cs" # subsystem tests

- id: VersionMark-Publishing-MarkdownFormatter
title: Review that VersionMark Publishing MarkdownFormatter Implementation is Correct
Expand All @@ -153,15 +153,15 @@ reviews:
paths:
- "docs/reqstream/version-mark/self-test/self-test.yaml" # subsystem requirements
- "docs/design/version-mark/self-test/self-test.md" # subsystem design
- "test/**/SelfTest/SelfTestSubsystemTests.cs" # subsystem tests
- "test/**/SelfTest/SelfTestTests.cs" # subsystem tests

- id: VersionMark-SelfTest-Validation
title: Review that VersionMark SelfTest Validation Implementation is Correct
paths:
- "docs/reqstream/version-mark/self-test/validation.yaml" # requirements
- "docs/design/version-mark/self-test/validation.md" # design
- "src/**/SelfTest/Validation.cs" # implementation
- "test/**/SelfTest/SelfTestSubsystemTests.cs" # subsystem tests (no separate unit test file)
- "test/**/SelfTest/SelfTestTests.cs" # subsystem tests (no separate unit test file)

- id: VersionMark-SelfTest-PathHelpers
title: Review that VersionMark SelfTest PathHelpers Implementation is Correct
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ namespace DemaConsulting.VersionMark.Tests.Capture;
/// Subsystem tests for the Capture subsystem (version capture and persistence pipeline).
/// </summary>
[TestClass]
public class CaptureSubsystemTests
public class CaptureTests
{
/// <summary>
/// Test that the full capture pipeline saves and loads version data without data loss.
/// </summary>
[TestMethod]
public void CaptureSubsystem_SaveAndLoad_PreservesAllVersionData()
public void Capture_SaveAndLoad_PreservesAllVersionData()
{
// Arrange - Create version info representing a complete capture result
var tempFile = Path.GetTempFileName();
Expand Down Expand Up @@ -73,7 +73,7 @@ public void CaptureSubsystem_SaveAndLoad_PreservesAllVersionData()
/// Test that the capture subsystem correctly handles multiple capture files from the same job.
/// </summary>
[TestMethod]
public void CaptureSubsystem_MultipleCaptures_EachFileHasDistinctJobId()
public void Capture_MultipleCaptures_EachFileHasDistinctJobId()
{
// Arrange - Create two capture files representing different CI jobs
var tempFile1 = Path.GetTempFileName();
Expand Down Expand Up @@ -108,7 +108,7 @@ public void CaptureSubsystem_MultipleCaptures_EachFileHasDistinctJobId()
/// Test that loading a version info file that does not exist throws an ArgumentException.
/// </summary>
[TestMethod]
public void CaptureSubsystem_LoadFromFile_NonExistentFile_ThrowsArgumentException()
public void Capture_LoadFromFile_NonExistentFile_ThrowsArgumentException()
{
// Arrange
var nonExistentPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid() + ".json");
Expand All @@ -121,7 +121,7 @@ public void CaptureSubsystem_LoadFromFile_NonExistentFile_ThrowsArgumentExceptio
/// Test that Context correctly sets the capture mode flag when --capture is specified.
/// </summary>
[TestMethod]
public void CaptureSubsystem_Context_CaptureFlag_SetsCaptureMode()
public void Capture_Context_CaptureFlag_SetsCaptureMode()
{
// Arrange & Act - Create a context with --capture and required --job-id
using var context = Context.Create(["--capture", "--job-id", "test-job"]);
Expand All @@ -135,7 +135,7 @@ public void CaptureSubsystem_Context_CaptureFlag_SetsCaptureMode()
/// Test that Context correctly stores the job ID from --job-id parameter.
/// </summary>
[TestMethod]
public void CaptureSubsystem_Context_WithJobId_SetsJobId()
public void Capture_Context_WithJobId_SetsJobId()
{
// Arrange & Act - Create a context with --capture and a specific job ID
using var context = Context.Create(["--capture", "--job-id", "my-build-job"]);
Expand All @@ -149,7 +149,7 @@ public void CaptureSubsystem_Context_WithJobId_SetsJobId()
/// Test that when --output is not specified, the default filename includes the job ID.
/// </summary>
[TestMethod]
public void CaptureSubsystem_Run_NoOutputFlagSpecified_UsesDefaultFilename()
public void Capture_Run_NoOutputFlagSpecified_UsesDefaultFilename()
{
// Arrange - Set up temp directory with config; run without --output so default filename is used
var currentDir = Directory.GetCurrentDirectory();
Expand Down Expand Up @@ -191,7 +191,7 @@ public void CaptureSubsystem_Run_NoOutputFlagSpecified_UsesDefaultFilename()
/// Test that Context correctly stores tool names from the -- separator.
/// </summary>
[TestMethod]
public void CaptureSubsystem_Context_WithToolFilter_SetsToolNames()
public void Capture_Context_WithToolFilter_SetsToolNames()
{
// Arrange & Act - Create a context with --capture and tool names after --
using var context = Context.Create(["--capture", "--job-id", "x", "--", "dotnet", "git"]);
Expand All @@ -207,7 +207,7 @@ public void CaptureSubsystem_Context_WithToolFilter_SetsToolNames()
/// Test that capture without a tool filter captures all tools defined in configuration.
/// </summary>
[TestMethod]
public void CaptureSubsystem_Run_NoToolFilter_CapturesAllConfiguredTools()
public void Capture_Run_NoToolFilter_CapturesAllConfiguredTools()
{
// Arrange - Set up temp directory with a two-tool config; no tool filter specified
var currentDir = Directory.GetCurrentDirectory();
Expand Down Expand Up @@ -258,7 +258,7 @@ public void CaptureSubsystem_Run_NoToolFilter_CapturesAllConfiguredTools()
/// Test that VersionMarkConfig.ReadFromFile correctly loads tool definitions from a YAML file.
/// </summary>
[TestMethod]
public void CaptureSubsystem_Config_ReadFromFile_LoadsToolDefinitions()
public void Capture_Config_ReadFromFile_LoadsToolDefinitions()
{
// Arrange - Write a .versionmark.yaml file to a temp path
var tempFile = Path.GetTempFileName() + ".yaml";
Expand Down Expand Up @@ -294,7 +294,7 @@ public void CaptureSubsystem_Config_ReadFromFile_LoadsToolDefinitions()
/// Test that FindVersions executes the configured command and extracts the version via regex.
/// </summary>
[TestMethod]
public void CaptureSubsystem_FindVersions_ExecutesCommandAndExtractsVersion()
public void Capture_FindVersions_ExecutesCommandAndExtractsVersion()
{
// Arrange - Create a configuration for dotnet (always available in the build environment)
var tempFile = Path.GetTempFileName() + ".yaml";
Expand Down Expand Up @@ -328,7 +328,7 @@ public void CaptureSubsystem_FindVersions_ExecutesCommandAndExtractsVersion()
/// Test that the capture pipeline displays captured tool versions to the user.
/// </summary>
[TestMethod]
public void CaptureSubsystem_Run_DisplaysCapturedVersionsAfterCapture()
public void Capture_Run_DisplaysCapturedVersionsAfterCapture()
{
// Arrange - Set up temp directory with config and redirect console output to capture it
var currentDir = Directory.GetCurrentDirectory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ namespace DemaConsulting.VersionMark.Tests.Cli;
/// Subsystem tests for the Cli subsystem (Program and Context working together).
/// </summary>
[TestClass]
public class CliSubsystemTests
public class CliTests
{
/// <summary>
/// Test that the full CLI pipeline with --version flag exits cleanly.
/// </summary>
[TestMethod]
public void CliSubsystem_Run_VersionFlag_ExitsCleanly()
public void Cli_Run_VersionFlag_ExitsCleanly()
{
// Arrange - Create a context with --version via the full CLI pipeline
using var context = Context.Create(["--version"]);
Expand All @@ -48,7 +48,7 @@ public void CliSubsystem_Run_VersionFlag_ExitsCleanly()
/// Test that the full CLI pipeline with --silent flag suppresses standard output.
/// </summary>
[TestMethod]
public void CliSubsystem_Run_SilentWithVersionFlag_SuppressesOutput()
public void Cli_Run_SilentWithVersionFlag_SuppressesOutput()
{
// Arrange - Redirect console output to capture what the CLI writes
var originalOut = Console.Out;
Expand Down Expand Up @@ -76,7 +76,7 @@ public void CliSubsystem_Run_SilentWithVersionFlag_SuppressesOutput()
/// Test that the full CLI pipeline with --help flag displays usage information.
/// </summary>
[TestMethod]
public void CliSubsystem_Run_HelpFlag_DisplaysUsageInformation()
public void Cli_Run_HelpFlag_DisplaysUsageInformation()
{
// Arrange
var originalOut = Console.Out;
Expand Down Expand Up @@ -106,7 +106,7 @@ public void CliSubsystem_Run_HelpFlag_DisplaysUsageInformation()
/// Test that the full CLI pipeline with --validate flag runs self-validation.
/// </summary>
[TestMethod]
public void CliSubsystem_Run_ValidateFlag_RunsValidation()
public void Cli_Run_ValidateFlag_RunsValidation()
{
// Arrange
using var context = Context.Create(["--validate", "--silent"]);
Expand All @@ -122,7 +122,7 @@ public void CliSubsystem_Run_ValidateFlag_RunsValidation()
/// Test that the full CLI pipeline rejects unknown arguments by throwing ArgumentException.
/// </summary>
[TestMethod]
public void CliSubsystem_Run_InvalidArgs_ThrowsArgumentException()
public void Cli_Run_InvalidArgs_ThrowsArgumentException()
{
// Arrange - No setup required; unknown flags are rejected by Context.Create

Expand All @@ -138,7 +138,7 @@ public void CliSubsystem_Run_InvalidArgs_ThrowsArgumentException()
/// Test that the full CLI pipeline with --lint flag succeeds for a valid config file.
/// </summary>
[TestMethod]
public void CliSubsystem_Run_LintFlag_ValidConfig_Succeeds()
public void Cli_Run_LintFlag_ValidConfig_Succeeds()
{
// Arrange
var tempFile = Path.GetTempFileName() + ".yaml";
Expand Down Expand Up @@ -169,7 +169,7 @@ public void CliSubsystem_Run_LintFlag_ValidConfig_Succeeds()
/// Test that the full CLI pipeline with --results flag writes validation results to a file.
/// </summary>
[TestMethod]
public void CliSubsystem_Run_ResultsFlag_WritesResultsFile()
public void Cli_Run_ResultsFlag_WritesResultsFile()
{
// Arrange - Set up a results file path that should be written during --validate
var resultsFile = Path.GetTempFileName() + ".trx";
Expand Down Expand Up @@ -201,7 +201,7 @@ public void CliSubsystem_Run_ResultsFlag_WritesResultsFile()
/// Test that the full CLI pipeline with --log flag writes output to a log file.
/// </summary>
[TestMethod]
public void CliSubsystem_Run_LogFlag_WritesOutputToLogFile()
public void Cli_Run_LogFlag_WritesOutputToLogFile()
{
// Arrange - Set up a log file that should be written with version output
var logFile = Path.GetTempFileName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ namespace DemaConsulting.VersionMark.Tests.Configuration;
/// Subsystem tests for configuration loading via <see cref="Program.Run"/> with the <c>--lint</c> flag.
/// </summary>
[TestClass]
public class ConfigurationLoadSubsystemTests
public class ConfigurationLoadTests
{
/// <summary>
/// Test that the full configuration load pipeline succeeds and exits cleanly for a valid configuration.
/// </summary>
[TestMethod]
public void ConfigurationLoadSubsystem_Run_ValidConfig_SucceedsWithZeroExitCode()
public void ConfigurationLoad_Run_ValidConfig_SucceedsWithZeroExitCode()
{
// Arrange - Write a complete and valid configuration to a temp file
var tempFile = Path.GetTempFileName();
Expand Down Expand Up @@ -68,7 +68,7 @@ public void ConfigurationLoadSubsystem_Run_ValidConfig_SucceedsWithZeroExitCode(
/// Test that the configuration load pipeline reports all errors in a single pass for an invalid configuration.
/// </summary>
[TestMethod]
public void ConfigurationLoadSubsystem_Run_MultipleErrors_ReportsAllErrorsInSinglePass()
public void ConfigurationLoad_Run_MultipleErrors_ReportsAllErrorsInSinglePass()
{
// Arrange - Write a configuration with multiple errors to a temp file
// tool1 is missing 'regex'; tool2 is missing 'command' and has a regex without a 'version' group
Expand Down Expand Up @@ -120,7 +120,7 @@ public void ConfigurationLoadSubsystem_Run_MultipleErrors_ReportsAllErrorsInSing
/// Test that the configuration load pipeline fails for invalid YAML content.
/// </summary>
[TestMethod]
public void ConfigurationLoadSubsystem_Run_InvalidYaml_Fails()
public void ConfigurationLoad_Run_InvalidYaml_Fails()
{
// Arrange - Write syntactically broken YAML to a temp file
var tempFile = Path.GetTempFileName() + ".yaml";
Expand All @@ -145,7 +145,7 @@ public void ConfigurationLoadSubsystem_Run_InvalidYaml_Fails()
/// Test that the configuration load pipeline reports an error when the config file does not exist.
/// </summary>
[TestMethod]
public void ConfigurationLoadSubsystem_Run_NonExistentFile_Fails()
public void ConfigurationLoad_Run_NonExistentFile_Fails()
{
// Arrange - Use a path that does not exist
var nonExistentPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid() + ".yaml");
Expand All @@ -162,7 +162,7 @@ public void ConfigurationLoadSubsystem_Run_NonExistentFile_Fails()
/// Test that the configuration load pipeline reports an error when a regex cannot be compiled.
/// </summary>
[TestMethod]
public void ConfigurationLoadSubsystem_Run_InvalidRegex_ReportsError()
public void ConfigurationLoad_Run_InvalidRegex_ReportsError()
{
// Arrange - Write a config with a syntactically broken regex (unclosed group)
var tempFile = Path.GetTempFileName();
Expand Down Expand Up @@ -195,7 +195,7 @@ public void ConfigurationLoadSubsystem_Run_InvalidRegex_ReportsError()
/// Test that the configuration load pipeline reports an error when a regex does not contain a named 'version' capture group.
/// </summary>
[TestMethod]
public void ConfigurationLoadSubsystem_Run_RegexWithoutVersionGroup_ReportsError()
public void ConfigurationLoad_Run_RegexWithoutVersionGroup_ReportsError()
{
// Arrange - Write a config with a valid regex that lacks the required 'version' group
var tempFile = Path.GetTempFileName();
Expand Down Expand Up @@ -228,7 +228,7 @@ public void ConfigurationLoadSubsystem_Run_RegexWithoutVersionGroup_ReportsError
/// Test that the configuration load pipeline reports an error when an OS-specific command override is empty.
/// </summary>
[TestMethod]
public void ConfigurationLoadSubsystem_Run_EmptyOsSpecificOverride_ReportsError()
public void ConfigurationLoad_Run_EmptyOsSpecificOverride_ReportsError()
{
// Arrange - Write a config with an empty command-win override
var tempFile = Path.GetTempFileName();
Expand Down Expand Up @@ -262,7 +262,7 @@ public void ConfigurationLoadSubsystem_Run_EmptyOsSpecificOverride_ReportsError(
/// Test that the configuration load pipeline treats unknown keys as non-fatal warnings and succeeds.
/// </summary>
[TestMethod]
public void ConfigurationLoadSubsystem_Run_UnknownKey_IsWarningNotError()
public void ConfigurationLoad_Run_UnknownKey_IsWarningNotError()
{
// Arrange - Write a config with a valid tool plus an unknown key
var tempFile = Path.GetTempFileName();
Expand Down Expand Up @@ -296,7 +296,7 @@ public void ConfigurationLoadSubsystem_Run_UnknownKey_IsWarningNotError()
/// Test that configuration load error messages include the filename and line/column location.
/// </summary>
[TestMethod]
public void ConfigurationLoadSubsystem_Run_Error_IncludesFileAndLineInfo()
public void ConfigurationLoad_Run_Error_IncludesFileAndLineInfo()
{
// Arrange - Write a config missing the required 'command' field and capture error output
var tempFile = Path.GetTempFileName();
Expand Down
Loading