You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make GVFSService.Windows & GVFSService.Mac follow similar implementation pattern #1045
In GVFSService.Windows.cs this.repoRegistry and this.requestHandler are created in Run rather than the constructor. Can we do the same here and create these in RunWithArgs?
Unless there is a reason this has to be in the constructor I think we'd be better off keeping the classes consistent across platforms.
Ameen (@alameenshah)
alameenshah 4 hours ago Author Member
Initializing these in the Constructor makes it easy for UT. Dependencies (repoRegistry, requestHandler) can be Mocked and the Mock objects can be injected as arguments to the Constructor. This is the pattern I use in the upcoming UT PR. We can probably use this pattern in GVFSService.Windows.cs if we decide to do UT for that class.
William Baker (@wilbaker)
wilbaker 7 minutes ago Member
We can probably use this pattern in GVFSService.Windows.cs if we decide to do UT for that class.
Even if we're not writing UT for Windows in the near future, can we still make the code structure on Mac and Windows consistent?
William Baker (@wilbaker)
wilbaker 6 minutes ago Member
If you add a TODO to your PR/Work Item for your UT work I am okay with deferring the change until then, I just don't want us to lose track of it 😄
Activity