fix(vscode): Resolve Hyphen Handling, Mock Generator Formatting, and Add Missing Reference Errors in Templates #6075
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Requirement Checklist
Work Items
Add
coverlet.collector
to package reference in generatedcsproj
Implement consistent handling of hyphens in
unitTestName
andWorkflowName
inputsCompile error - rootPath missing
this
referenceFormatting issue in mock generator helper doc comments
Uncomment
var actionMocks
inPREPARE Mock
sectionType of Change
Issues Addressed:
coverlet.collector
to package reference in generatedcsproj
to improve code coverage collection capabilities.unitTestName
andWorkflowName
inputs by replacing hyphens (-
) with underscores (_
) in generated.cs
files, improving readability, maintainability, and compatibility with C# naming conventions.<actionName>
syntax causing compilation errors.this
reference forrootPath
, which caused a compile-time error.var actionMocks
inPREPARE Mock
section, affecting test completeness.New Behavior
Feature: Enhanced Naming Convention Consistency
User Input Handling:
-
) in fields likeunitTestName
andWorkflowName
.Code-Level Replacement:
.cs
files, hyphens inunitTestName
andWorkflowName
inputs are replaced with underscores (_
) to comply with C# naming conventions for methods and class names.unitTestName
andWorkflowName
now follow consistent naming conventions, enhancing readability and reducing potential errors.File and Folder Naming:
test-order-new-successful.cs
and a folderla-sample-workflow
retain their hyphenated format.Bug Fixes
Compile Error (
rootPath
):this
reference torootPath
where required, resolving the missing reference compile error.Formatting Issues in Mock Generator Helper:
<actionName>
toactionName
, avoiding compilation errors due to angle brackets.Uncommented
var actionMocks
in PREPARE Mock Section:var actionMocks
in thePREPARE Mock
section, restoring intended functionality for the unit tests.Impact of Change
Impact Analysis
These changes standardize naming conventions and improve code maintainability, reducing potential compile-time errors due to naming inconsistencies. The updates will positively impact downstream consumers by maintaining input-based naming preferences while ensuring that C# conventions are upheld within the code. No breaking changes are expected from this update.