dotnet / dotnet/arcade-services
Refactor PublishArtifactsInManifest and PublishArtifactsInManifestTests for better DI/mock support
- Dominant language
- C#
- Stars
- 86
- Forks
- 86
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 35
Description
A heavy amount of refactoring for DI (dependency injection) support was added to Arcade per https://github.com/dotnet/arcade/pull/6672. Because of this, a lot of tasks were updated to use the DI because their dependencies were being refactored so that the MSBuild task that these tests were being built for could consume them through DI. PublishArtifactsInManifest was one of these tasks, and it should be refactored to follow better design patterns.
- [ ] The method WhichPublishingTask is made public for testing. However, it has a dependency that is configured when the Execute method is called.
- [ ] Currently, there are no mocks set up for these tests, and the fake model that is use doesn't contain all the pertinent information required to make the Execute method pass. So when the Execute method is called in the test in order to configure the dependencies through DI, the Execute method will return false.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.