I just built a patch for using the AMC with the new AAA 3.5 syntax.  I
would like to commit it but I wanted to see if anyone had any
objections to a minor breaking change?

Currently on the AMC there is a property that exposes the instance of
the MockRepository, in order to implement my patch I changed the
dependency on MockRepository to a new type IMockRepository in the AMC
assembly.  I then built two adapters, 1 just delegates all calls back
to an instance of a MockRepository, everything works the exact same.
The second adapter intercepts calls and uses the new static methods
for AAA on the MockRepository itself.  Since AAA has a lot less
functionality compared to using record/playback many calls just throw
NotAvaliableInAAAMode exceptions.

The breaking change is if people are doing anything with
MockRepository off of the AMC itself.  If so the impact is minimal as
the interface has the exact same methods and signatures as the actual
MockRepository, however if you are storing references to the
MockRepository property and are not using "var" you will have to
update a variable declaration:

Example of breaking changes:
MockRepository myMocks = amc.MockRepository

IMockRepository myMocks = amc.MockRepository.

Any thoughts?

The only other idea I had was to mark all methods on the
MockRepository itself as virtual so I could just use inheritance, but
I would prefer to put the adapters in place so RhinoMocks doesn't have
to be patched as well.

Adam


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/RhinoMocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to