DI Refactor: Azure.Mcp.Tools.ApplicationInsights#1899
Conversation
…stCommand constructor Co-authored-by: conniey <10136526+conniey@users.noreply.github.com>
|
@copilot Verify that Step 5 was done correctly. |
… (Step 5) Co-authored-by: conniey <10136526+conniey@users.noreply.github.com>
Step 5 (shared Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
| @@ -15,10 +15,11 @@ | |||
|
|
|||
There was a problem hiding this comment.
@copilot Double-check that Step 5 was done correctly.
There was a problem hiding this comment.
The test was missing a few parts of the Step 5 pattern. Fixed in a1970c9:
- Renamed
_serviceMock→_applicationInsightsService(consistent with service name convention) - Moved
loggerfrom local variable toprivate readonly ILogger<RecommendationListCommand> _loggerclass field - Changed constructor call to use implicit
new(_logger, _applicationInsightsService)syntax
The test now matches the same pattern as AccountListCommandTests (AppConfig).
There was a problem hiding this comment.
@copilot Step 5 includes executing New-ChangeLogEntry.ps1 to generate CHANGELOG entry. This is not done.
There was a problem hiding this comment.
Done in 34ae7f6. Generated servers/Azure.Mcp.Server/changelog-entries/copilot-di-refactor-applicationinsights.yaml via New-ChangelogEntry.ps1 under "Other Changes".
There was a problem hiding this comment.
@copilot it is missing the PR# in the generated changelog. try again.
There was a problem hiding this comment.
Added pr: 1899 to the changelog entry in 5e50fe2.
Co-authored-by: conniey <10136526+conniey@users.noreply.github.com>
Co-authored-by: conniey <10136526+conniey@users.noreply.github.com>
Co-authored-by: conniey <10136526+conniey@users.noreply.github.com>
IApplicationInsightsServiceintoRecommendationListCommandconstructor (removecontext.GetService<T>())RecommendationListCommandTeststo pass service mock directly to command constructor_commandDefinitionfield to tests and use_commandDefinition.Parse(...)in test methods (Step 5)_serviceMock→_applicationInsightsService, make logger a class field, use implicitnew()syntax (Step 5)New-ChangelogEntry.ps1with PR number (Step 5)Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.