MattHoneycutt / SpecsFor

SpecsFor is a light-weight Behavior-Driven Development framework that focuses on ease of use for *developers* by minimizing testing friction.
http://specsfor.com
MIT License
196 stars 70 forks source link

Structure Map v4? #94

Closed ChuckBryan closed 8 years ago

ChuckBryan commented 8 years ago

Hi Matt - I am using your Heroic IoC with SM 4. Any chance that SpecsFor might be updated to v4?

Thanks

Chuck

MattHoneycutt commented 8 years ago

Yup, I need to make that happen. I'll try to knock this out tomorrow.

On Thu, Apr 7, 2016 at 11:10 AM Chuck Bryan notifications@github.com wrote:

Hi Matt - I am using your Heroic IoC with SM 4. Any chance that SpecsFor might be updated to v4?

Thanks

Chuck

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/MattHoneycutt/SpecsFor/issues/94

Matt Honeycutt Pluralsight Author & Senior Web Application Architect [image: Heroic Applications] http://heroicapplications.com/ pluralsight vids http://www.pluralsight.com/author/matt-honeycutt | blog http://trycatchfail.com/ | website http://heroicapplications.com/ | @matthoneycutt http://twitter.com/matthoneycutt

ChuckBryan commented 8 years ago

The main thing I am trying to do is get my mediatr registered. I have been following your Pluralsight course, so, in my INeedMediator conventio, is all that I need to do is re-scan my assembly instead of passing it a Registry file?

MattHoneycutt commented 8 years ago

I believe that would do the trick, yes. Let me know if it doesn't. :)

On Thu, Apr 7, 2016 at 11:41 AM Chuck Bryan notifications@github.com wrote:

The main thing I am trying to do is get my mediatr registered. I have been following your Pluralsight course, so, in my INeedMediator conventio, is all that I need to do is re-scan my assembly instead of passing it a Registry file?

— You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub https://github.com/MattHoneycutt/SpecsFor/issues/94#issuecomment-206986250

Matt Honeycutt Pluralsight Author & Senior Web Application Architect [image: Heroic Applications] http://heroicapplications.com/ pluralsight vids http://www.pluralsight.com/author/matt-honeycutt | blog http://trycatchfail.com/ | website http://heroicapplications.com/ | @matthoneycutt http://twitter.com/matthoneycutt

ChuckBryan commented 8 years ago

My Mediatr Registry is working when I run the MVC App, but, when I don't think it is getting registered with AutoMock :/ I am using async task handlers, and am await-ing on the SendAsync. However, none of my breakpoints in the handler are being hit (from the testing suite). I am sure I've missed something simple....

ChuckBryan commented 8 years ago

I am wondering if having a different SM in my Web vs. in my Specs Lib is causing some "registration" confusion. Just for the record, this is the registration code in the ConfigureContainer (I moved it there just to try and eliminate moving parts)....

specsfor_error

The Error Message that I am getting back on 15 is:

image

The SM version in the Specs Lib is 3.1.00 and in the Web is 4.1.1.372...So, I'll put a pin in this until SM is updated in SF to match HIOC.

MattHoneycutt commented 8 years ago

SpecsFor 5.0 should be live on NuGet momentarily. This version uses the latest version of StructureMap. Please let me know if this resolves your issue.

ChuckBryan commented 8 years ago

I will check it as soon as possible. Since you had indicated you'd upgrade this, I just stuck with the F5 Unit Testing Framework for today (ugh)...Can't wait to get this folded back in!!

ChuckBryan commented 8 years ago

Was just pulling down to test and noticed that the structure.automocking libarary is no longer included? Is that by design? In my previous library, it was there and I was having conflict with the version of MOQ.

MattHoneycutt commented 8 years ago

Yup, that automocking functionality is now provided by SpecsFor instead.

On Sat, Apr 9, 2016, 7:02 AM Chuck Bryan notifications@github.com wrote:

Was just pulling down to test and noticed that the structure.automocking libarary is no longer included? Is that by design? In my previous library, it was there and I was having conflict with the version of MOQ.

— You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub https://github.com/MattHoneycutt/SpecsFor/issues/94#issuecomment-207780380

Matt Honeycutt Pluralsight Author & Senior Web Application Architect [image: Heroic Applications] http://heroicapplications.com/ pluralsight vids http://www.pluralsight.com/author/matt-honeycutt | blog http://trycatchfail.com/ | website http://heroicapplications.com/ | @matthoneycutt http://twitter.com/matthoneycutt

ChuckBryan commented 8 years ago

Matt - thanks a lot for the quick responses! I'm also using NCrunch and just discovered the magic of the setting "Allow Parallel test Execution" option...now my dots are green and I think I am fully doing integration testing with SpecsFor!

Also, I found the "UseFakeContextForController" because I made a Form Action Helper to reduce some of the repetitive Model Valid checking that I was doing.

Thanks!