Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Explicit interface order #337
Here's my attempt at fixing issue #315 and adding the ability to place explicit interface members after normal public methods.
Note I've added a dependency on NSubstitute (via NuGet) for the unit tests - I'm happy to change that to another mocking framework if you have a preference.
Thanks so much for putting this together. I'd like to look over it a little more, test it out and I'm sure I'll have a few comments - but at first blush it looks really good.
I haven't used NSubstitute before.. but I've used Moq and Microsoft Fakes which are similar. NSubstitute looks pretty straight-forward to me though so seems like we should roll with it. As you may have noticed I've done very little mocking, and very heavy integration testing through the IDE. It's more realistic, but it's also extremely slow and not CI friendly - so glad to see more pure unit tests.
Thanks for the kind comments - there's no rush as far as I'm concerned; the code in the project is in a real good shape to expand on (I was dreading figuring out how to add a setting but when I looked at the code it was very simple).
Like I said, I can swap out NSubstitute for Moq if you're more familiar with it - it's only used in one place to mock the CodeFunction2 interface, as it had far too many members to create a manual fake I figured it was easier to just use a mocking framework.
BTW, it looks like the CI server can't restore NuGet packages - since it's only the unit test project I figured it wouldn't hurt brining in an outside dependency but I'm not sure how to get the CI to do a nuget restore on it, sorry.
I'm glad you found the code accessible. :) Having something like 160 settings already does make that a pretty well-worn pattern. ;)
No need to swap out NSubstitute - again it looks pretty straight-forward and much lighter than Microsoft Fakes as an example.
I'll take a look into the CI server failing the builds. We are using NuGet for the main CodeMaid project so it already knows how to restore packages, but maybe it isn't doing it across the solution.
Overall looks great, just some minor nitpicks as I'm sure you anticipated from the mind of one obsessed with whitespace.. ;)
Thanks for the quick fixes. I'll play around with this a little locally with the plan to merge this weekend. After merging it will be auto-deployed to the CI channel so there will be a build you can install for use as well as it getting pushed out to anybody setup with a direct feed to that channel.
Sep 17, 2016
1 check passed
Thanks for that, just installed the CI and ran it over one of my projects that has some explicit interface methods mixed with public ones and it handles all the files now perfectly (for my OCD anyway :D )
I have no objection to my name appearing anywhere, though it's not necessary as I just wanted to give back to something I've used for years and love (it's the first thing that gets installed in VS).
Keep up the great work!