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

Integrate AutoNSubstitute into distribution #5

Closed
wants to merge 1 commit into from
Closed

Integrate AutoNSubstitute into distribution #5

wants to merge 1 commit into from

Conversation

irium
Copy link

@irium irium commented Aug 24, 2012

Hello. I've created AutoNSubstitute project - adapter for NSubstitute mocking framework to be used with AutoFixture.

While everything is working OK there are some issues:

  • I'm working on project on .NET 4.0 therefore it uses net40 version of NSubstitute, so I was forced to build AutoNSubstitute for net40 also.
  • I can not just put compiled AutoNSubstitute assembly into my project's 'lib' becausse AutoFixture NuGet libs are signed. So I decided it will be better to integrate the adapter into AutoFixture codebase by yourself, so you'll sign it and publish on NuGet. So everyone will be able to use it.

Thank you for attention.

@worldspawn
Copy link

+1

<dependency id="nsubstitute" version="1.4" />
</dependencies>
<summary>Turns AutoFixture into an Auto-Mocking Container based on NSubstitute.</summary>
<description>This extension turns AutoFixture into an Auto-Mocking Container. The mock instances are created by Moq. To use it, add the AutoNSubstituteCustomization to your Fixture instance. Read more at http://blog.ploeh.dk/2010/08/19/AutoFixtureAsAnAutomockingContainer.aspx</description>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the mock instances are created by NSubstitute not Moq.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I missed that while renaming "Moq" to "NSubstitute". Actually, I was not creating something new here, but simply taken AutoFixtgure.AutoMoq as base and just adapt code to NSubstitute.

@ploeh
Copy link
Member

ploeh commented Sep 9, 2012

Thanks for submitting this. I'm pretty swamped at the moment, but will take a look when I get some time to do so.

@dhilgarth
Copy link
Contributor

Is there an ETA when this will be included? Or are there quality problems preventing inclusion? Would it make sense to implement it myself and send another pull request?

@ploeh
Copy link
Member

ploeh commented Nov 9, 2012

Nikos (moodmosaic) has pointed out various issues that need to be addressed. From the quick scan of the code I did some months back, it looks salvageable, but in need of more work. This is a pretty good example of why it's not a particular good idea to send a big pull request out of the blue :)

I'd love it if someone would pick this up and fix the various issues. Perhaps it would be possible to make a fork of the fork and fix it...

Right now, my personal priority is than when I have time for AutoFixture at all, I think it's more important to work on version 3. In other words: no ETA from me...

@dhilgarth
Copy link
Contributor

Thanks for the quick response.
One point: I don't see how it would be possible to provide this kind of integration along with matching unit tests in a smaller pull request :-)

@ploeh
Copy link
Member

ploeh commented Nov 9, 2012

You don't have to complete the entire feature at once - particularly not in a single commit.

A Feature Toggle is an excellent way to deal with this issue, and in this particular context the Feature Toggle is easy to identify: just don't publish the new library before it's done.

That's how I originally created AutoFixture.Idioms. That solution existed for a long time before it was published.

@ploeh
Copy link
Member

ploeh commented Jan 6, 2013

Meanwhile, @dhilgarth ended up submitting a more idiomatic pull request for the same feature. While the present pull request precedes the one submitted by @dhilgarth the latter pull request was simply easier to accept, so I've done that.

The AutoFixture.AutoNSubstitute NuGet package went live an hour ago, so now that there's an official NSubstitute extension I'm closing this request.

@ploeh ploeh closed this Jan 6, 2013
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

Successfully merging this pull request may close these issues.

6 participants