Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this library active? it not compatible with last versions of moq... #5

Open
arielorvits opened this issue Mar 13, 2017 · 11 comments

Comments

@arielorvits
Copy link

"Unable to find a version of 'Moq' that is compatible with 'structuremap.automocking.moq 4.0.0.315 constraint: Moq (= 4.0.10827)'."

@jeremydmiller
Copy link
Contributor

I should have deleted this repo. All the code for this is in the main StructureMap repo. I've been wanting to discontinue the separate packages forever. All the auto-mocking stuff is in the main lib except for the mocking library specific adapter. Find the MoqAutoMocker class in the main StructureMap repo and copy/paste that code into yours and you should be good to go.

@arielorvits
Copy link
Author

arielorvits commented Mar 14, 2017

Thanks!
I didn't found this on the main structureMap, and also needed to copy 3 classes (to compile the code):
MoqFactory
MoqServiceLocator
MoqAutoMocker
(from StructureMap.AutoMocking repository).

and now it is working.

why wont this code will be released officially as part of updated structuremap package?

@jeremydmiller
Copy link
Contributor

jeremydmiller commented Mar 14, 2017 via email

@arielorvits
Copy link
Author

arielorvits commented Mar 14, 2017

It's your decision, but I just started using this and I think it is great. and very very useful! saving my time! thanks again 👍

@digitaldias
Copy link

I can't live without this one! structuremap.AutoMocking.Moq is my life and blood!

@arielorvits
Copy link
Author

@digitaldias I now switched to autoFixture which do the same and maintained as nuget package

@jeremydmiller
Copy link
Contributor

@digitaldias You can still happily use the auto mocking if you'll just copy/paste the Moq adapter bit of it into your own code. The core auto-mocking support is in StructureMap itself. I use it a little bit w/ NSubstitute in newer projects.

@arielorvits You know that the original AutoFixture author just walked away from the project, right?

@arielorvits
Copy link
Author

@jeremydmiller yes, but still it has big community, and it is more comfortable to use nuget package than copy paste code in my opinion. especially on upgrading other packages.

@jeremydmiller
Copy link
Contributor

Maybe, but you're setting yourself up for diamond dependency hell. Mostly though, I just don't think that what SM's automocking or AutoFixture does is all that valuable these days.

@arielorvits
Copy link
Author

arielorvits commented Apr 6, 2017

using nunit, moq. when I want separate SetUps for groups of test, so creating some testFixtures for single class (with 10 dependencies for example).

if I need explicitly register each dependency in all testFixtures it'll spent my time. using SM's automocking or AutoFixture I setup just 1-2 dependencies in each testFixture.

@Arithmomaniac
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants