used by IsCompatibleWith(this object, Type) extension method.
Thanks to Marc Gravell's StackOverflow answer for this approach:
http://stackoverflow.com/a/1770232/906
Alerts people that some substitute delegates will now return a new sub
instead of null which may break tests, and provides instructions on how
to fix.
Hopefully tests which rely on null from a substitute func will be fairly
rare, but it seems worth alerting people to the possibility.
* Update CHANGELOG.
* Moved Type.GetMethod lookups to readonly static fields so we get the
one-off reflection lookup (instead of per instance).
* Minor renames/moves to refresh my understanding of how this works.
* Removed DelegateCallSpecs; tested through DelegateProxyFactorySpecs.
each one that does not match the specified call.
* Added ArgumentSpecification.FormatArgument(object) which delegates
to its matcher's formatting if the matcher implements IArgumentFormatter,
otherwise falls back to the default format provided by ArgumentFormatter.
* Updated ArrayContentsArgumentMatcher to implement IArgumentsFormatter
and format each params argument against its respective argspec.
* Updated CallFormatter to accept pre-formatted args so it no longer has to
dig into the spec's non-matching args. Replaced its ICallFormatter interface
with more general IMethodFormatter (it is basically a composite method
formatter).
* Removed ArgumentsFormatter and replaced with Join extension method.
- SL40 target in Rakefile was broken. Added back as experimental target.
- SL40 compilation error with SL40-specific code.
- Updated SilverlightLibraryPath in csproj files to point to Reference
Assemblies rather than specific SL build/patch version.
Thanks to Martin Hollingsworth for these fixes
(http://groups.google.com/group/nsubstitute/msg/7d0f600804f87f0a)
to describe why they failed to match a particular argument.
- Implemented ArgumentMatchInfo.DescribeNonMatch().
- Made GenericToNonGenericArgumentMatcher<T> implement IDescribeNonMatches
so that it can delegate to its matcher if the matcher supports describe.
- ArgumentSpecification.DescribeNonMatch(object) returns description of
non-match if matcher supports it, otherwise string.Empty.
- ReceivedCallsExceptionThrower responsible for indenting non-match descriptions
appropriately.
Action no longer exposed on IArgumentSpecification.
CallSpecification can tell ArgumentSpecification to run actions, or create
copies of themselves that match any args with same action for compatible
types.
Removing old argument specifications and replacing with argument specification that uses matchers
Added support for byref types to MatcherArgumentSpecification and
renamed it to ArgumentSpecification after removing for abstract
base class.
Updated ArrayContentsArgumentSpecificaton to inherit from IArgumentSpecification
and implemented functionality from old ArgumentSpecification abstract
base class.
Added IArgumentMatcher<T> interface to make it easier to enqueue custom matchers.
Added ArgumentSpecificationQueue to encapsulate creating arg specs
from matchers and queuing them in the current SubstitutionContext.
Removed IReceivedCalls.FindMatchingCalls(...) and instead query from IReceivedCalls.AllCalls().
Improved thread-safety of CallStack.AllCalls() to copy ConcurrentStack before reversing and
returning it to the caller to query.
Updated CheckReceivedCallsHandler to only access IReceivedCalls.AllCalls() once, then
perform subsequent queries on that same copy of the data so checking
received calls and building exception msgs are based on the same information.
Closes#64.
Updated sample exception messages to match new format.
Renamed references to CallNotReceivedException to ReceivedCallsException.
Added Received(x) examples to Received Calls help topic.