Refactoring the NuGet XPlat CLI reports to be testable #11159
Replies: 3 comments 3 replies
-
/cc @zivkan @nkolev92 @dominoFire @joelverhagen @aortiz-msft |
Beta Was this translation helpful? Give feedback.
-
I definitely like the general idea. We should consider this change early in the next release imo, that way it gives us plenty of time to catch potential issues. |
Beta Was this translation helpful? Give feedback.
-
Regarding an abstraction for metadata fetching, But I'm not opposed to having a simpler API to mock for tests that's more specific to what |
Beta Was this translation helpful? Give feedback.
-
I'll raise this as a discussion as there may be a better way to do this. I prototyped some changes to the XPlat list package command runner code to make it more directly testable in UTs. The current state of the code is:
This should have a report writer type and file system types and metadata fetch types which can be abstracted away for testing. Here's the prototype. It doesn't include proposed fixtures or tests, but these can be extrapolated and mocked/faked from the interfaces presented here.
Thoughts?
https://github.com/NuGet/NuGet.Client/tree/dev-drewgil-refactorforreporttesting
Beta Was this translation helpful? Give feedback.
All reactions