update NSubstitute and NUnit packages

This commit is contained in:
Sean Kaim
2017-03-14 16:17:25 -04:00
parent 9b27200793
commit 207accf21f
14 changed files with 6 additions and 2787 deletions

View File

@@ -62,12 +62,12 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\mRemoteV1\References\log4net.dll</HintPath>
</Reference>
<Reference Include="NSubstitute, Version=1.10.0.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
<HintPath>..\packages\NSubstitute.1.10.0.0\lib\net45\NSubstitute.dll</HintPath>
<Reference Include="NSubstitute, Version=2.0.2.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
<HintPath>..\packages\NSubstitute.2.0.2\lib\net45\NSubstitute.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.5.0\lib\net45\nunit.framework.dll</HintPath>
<Reference Include="nunit.framework, Version=3.6.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
<HintPath>..\packages\NUnit.3.6.1\lib\net45\nunit.framework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="NUnitForms">

View File

@@ -3,7 +3,7 @@
<package id="BouncyCastle" version="1.8.1" targetFramework="net45" />
<package id="DockPanelSuite" version="2.10.0" targetFramework="net45" />
<package id="DockPanelSuite.ThemeVS2012Light" version="2.10.0" targetFramework="net45" />
<package id="NSubstitute" version="1.10.0.0" targetFramework="net45" />
<package id="NUnit" version="3.5.0" targetFramework="net45" />
<package id="NSubstitute" version="2.0.2" targetFramework="net45" />
<package id="NUnit" version="3.6.1" targetFramework="net45" />
<package id="ObjectListView.Official" version="2.9.1" targetFramework="net45" />
</packages>

View File

@@ -1,199 +0,0 @@
================================================================================================
1.10.0 Release
================================================================================================
Substitutes will now automatically return an empty `IQueryable<T>` for
members that return that type. Tests previously relying on a
substitute `IQueryable<T>` will no longer work properly.
Reason:
Code that uses an `IQueryable<T>` can now run using the auto-subbed
value without causing null pointer exceptions (see issue #67).
Fix:
Avoid mocking `IQueryable<T>` where possible -- configure members
to return a real `IQueryable<T>` instead.
If a substitute is required, explicitly configure the call to return
a substitute:
sub.MyQueryable().Returns(Substitute.For<IQueryable<int>>());
================================================================================================
1.9.1 Release
================================================================================================
Substitutes set up to throw exception for methods with return type Task<T>
cause compilation to fail due to the call being ambiguous (CS0121).
"The call is ambiguous between the following methods or properties:
.Returns<Task<T>> and .Returns<T>"
Reason:
To make it easier to stub async methods. See issue #189.
Fix:
Specify generic type argument explicitly. If Method() returns string:
Old: sub.Method().Returns(x => { throw new Exception() });
New: sub.Method().Returns<string>(x => { throw new Exception() });
================================================================================================
1.8.0 Release
================================================================================================
Incorrect use of argument matchers outside of a member call, particularly within a
Returns(), will now throw an exception (instead of causing unexpected behaviour
in other tests: see https://github.com/nsubstitute/NSubstitute/issues/149).
Reason:
Prevent accidental incorrect use from causing hard-to-find errors in unrelated tests.
Fix:
Do not use argument matchers in Returns() or outside of where an argument is normally used.
Correct use: sub.Method(Arg.Any<string>()).Returns("hi")
Incorrect use: sub.Method().Returns(Arg.Any<string>())
================================================================================================
1.7.0 Release
================================================================================================
Auto-substitute for pure virtual classes with at least one public static method, which
means some methods and properties on substitutes that used to return null by default will now
return a new substitute of that type.
Reason:
Keep consistency with the behaviour of other pure virtual classes.
Fix:
Explicitly return null from methods and property getters when required for a test.
e.g. sub.Method().Returns(x => null);
------------------------------------------------------------------------------------------------
Moved `Received.InOrder` feature from `NSubstitute.Experimental` to main `NSubstitute` namespace.
Obsoleted original `NSubstitute.Experimental.Received`.
This can result in ambiguous reference compiler errors and obsolete member compiler earnings.
Reason:
Promoted experimental Received feature to core library.
Fix:
Import `NSubstitute` namespace instead of `NSubstitute.Experimental`.
(If `NSubstitute` is already imported just delete the `using NSubstitute.Experimental;` line from your fixtures.)
================================================================================================
1.5.0 Release
================================================================================================
The base object methods (Equals, GetHashCode and ToString) for substitute objects of classes that
extend those methods now return the result of calling the actual implementation of those methods
rather than the default value for the return type. This means that places where you relied on
.Equals returning false, .ToString returning null and .GetHashCode returning 0 because the actual
methods weren't called will now call the actual implementation.
Reason:
Substitute objects of classes that overrode those methods that were used as parameters for
setting up return values or checking received calls weren't able to be directly used within the
call, e.g. instead of:
someObject.SomeCall(aSubstitute).Returns(1);
You previously needed to have:
someObject.SomeCall(Arg.Is<TypeBeingSubstituted>(a => a == aSubstitute)).Returns(1);
However, now you can use the former, which is much more terse and consistent with the way other
Returns or Received calls work.
This means that substitute objects will now always work like .NET objects rather than being
inconsistent when the class being substituted overrode any of those base object methods.
Fix:
There is no workaround to change the behaviour of .Equals, .GetHashCode or .ToString. If you have
a use case to change the behaviour of these methods please lodge an issue at the NSubstitute
Github site.
------------------------------------------------------------------------------------------------
In rare cases the new `Returns()` and `ReturnsForAnyArgs()` overloads can cause compilation to fail due to the call being ambiguous (CS0121).
Reason:
The new overloads allow a sequence of callbacks to be used for return values. A common example is return several values, then throwing an exception.
Fix:
Remove the ambiguity by explicitly casting the arguments types or by using lambda syntax.
e.g. sub.Call().Returns(x => null, x => null);
================================================================================================
1.4.0 Release
================================================================================================
Auto-substitute from substitutes of `Func` delegates (following the same rules as auto-subbing
for methods and properties). So the delegate returned from `Substitute.For<Func<IFoo>>()` will
return a substitute of `IFoo`. This means some substitutes for delegates that used to return
null will now return a new substitute.
Reason:
Reduced setup when substituting for `Func` delegates, and consistency with behaviour for
properties and methods.
Fix:
Explicitly return null from substitute delegates when required for a test.
e.g. subFunc().Returns(x => null);
================================================================================================
1.2.0 Release
================================================================================================
Auto-substitute for pure virtual classes (in addition to interfaces and delegate types), which
means some methods and properties on substitutes that used to return null by default will now
return a new substitute of that type.
Reason:
Cut down the code required to configure substitute members that return interface-like types
(e.g. ASP.NET web abstractions like HttpContextBase) which are safe to create and proxy.
Safe classes are those with all their public methods and properties defined as virtual or
abstract, and containing a default, parameterless constructor defined as public or protected.
Fix:
Explicitly return null from methods and property getters when required for a test.
e.g. sub.Method().Returns(x => null);
================================================================================================
0.9.5 Release
================================================================================================
Raise.Event<TEventArgs>(...) methods renamed to Raise.EventWith<TEventArgs()
Reason:
The Raise.Event<TEventArgs>() signature would often conflict with the
Raise.Event<THandler>() method which is used to raise all types of events.
Raise.Event<THandler>() will now always work for any event type, while
Raise.EventWith<TEventArgs>() can be used as a shortcut to raise
EventHandler-style events with a particular argument.
Fix:
Replace Raise.Event<TEventArgs>() calls with equivalent Raise.EventWith<TEventArgs>() call.
------------------------------------------------------------------------------------------------
Raise.Action() methods removed
Reason:
The Raise.Event<THandler>() method can be used to raise all delegate events, including Actions.
Raise.Action() was removed so there is a consistent way of raising all delegate events.
Fix:
- Replace Raise.Action() calls with Raise.Event<Action>().
- Replace Raise.Action<T>(T arg) calls with Raise.Event<Action<T>>(arg).
- Replace Raise.Action<T1,T2>(T1 x, T2 y) calls with Raise.Event<Action<T1,T2>>(x, y).
================================================================================================
0.9.0 Release
================================================================================================
No breaking changes.

View File

@@ -1,151 +0,0 @@
### 1.10.0 (March 2016)
* [NEW] Callbacks builder for more control over When..Do callbacks. Thanks to bartoszgolek. (#202, #200)
* [NEW] Auto-substitute for IQueryable<T>. Thanks to emragins. (#67)
* [FIX] Fix bug when showing params arguments for value types (#214)
* [FIX] Fix bug when showing params arguments for Received.InOrder calls (#211)
### 1.9.2 (October 2015)
* [UPDATE] Mark Exceptions as [Serializable]. Thanks to David Mann. (#201)
* [FIX] Fix bug with concurrently creating delegate substitutes. Thanks to Alexandr Nikitin. (#205)
### 1.9.1 (October 2015)
* [FIX] Fix bug introduced in 1.9.0 that made checking a call was Received() clear previously stubbed values for that call.
### 1.9.0 (October 2015)
* [NEW] Allow awaiting of async methods with Received()/DidNotReceive(). Thanks to Marcio Rinaldi for this contribution. (#190, #191)
* [NEW] Task-specific Returns methods to make it easier to stub async methods. Thanks to Antony Koch for implementing this, and thanks to Marius Gundersen and Alexandr Nikitin for the suggestion and discussion regarding the change. (#189) (Also thanks to Jake Ginnivan who tried adding this back in #91, but I didn't merge that part of the PR in. Sorry!)
* [NEW] ReturnsForAll<T> extension method. Thanks to Mike Hanson for this contribution. (#198, #196)
### 1.8.2 (May 2015)
* [NEW] Convenience .ReturnsNull() extensions in NSubstitute.ReturnsExtensions. Thanks to Michal Wereda for this contribution. (#181)
* [NEW] CallInfo.ArgAt<T>(int) added to match argument at a given position and cast to the required type. Thanks to @jotabe-net for this contribution. (#175)
* [NEW] Convenience Throws() extensions in NSubstitute.ExceptionExtensions (sub.MyCall().Throws(ex)). Thanks to Michal Wereda for this contribution. Thanks also to Geir Sagberg for helpful suggestions relating to this feature. (#172)
### 1.8.1 (December 2014)
* [FIX] Fix for methods returning multidimensional arrays. Thanks to Alexandr Nikitin. (#170)
### 1.8.0 (November 2014)
* [NEW] Convenience methods for throwing exceptions with When-Do. Thanks to Geir Sagberg for this contribution.
* [FIX] Throw exception when arg matcher used within Returns. (#149)
### 1.7.2 (March 2014)
* [FIX] Basic support for types that return dynamic. Thanks to Alexandr Nikitin. (#75)
* [NEW] Auto-subbing for observables. Thanks to Paul Betts.
### 1.7.1 (January 2014)
* [FIX] Ambiguous arg exception with out/ref parameters. Thanks to Alexandr Nikitin. (#129)
### 1.7.0 (January 2014)
* [NEW] Partial subs (Substitute.ForPartsOf<T>()). Thanks to Alexandr Nikitin for tonnes of hard work on this feature (and for putting up with a vacillating project owner :)).
* [UPDATE] Received.InOrder moved out of Experimental namespace.
* [FIX] Argument matching with optional parameters. Thanks to Peter Wiles. (#111)
* [FIX] Argument matching with out/ref. Thanks to Kevin Bosman. (#111)
* [FIX] The default return value for any call that returns a concrete type that is purely virtual, but also has at least one public static method in it will be a substitute rather than null. Thanks to Robert Moore (@robdmoore) for this contribution. (#118)
### 1.6.1 (June 2013)
* [FIX] Detect and throw on type mismatches in Returns() caused by Returns(ConfigureOtherSub()).
* [FIX] Support raising exceptions that do not implement a serialisation constructor (#110). Thanks to Alexandr Nikitin for this contribution.
### 1.6.0 (April 2013)
* [NEW] .AndDoes() method for chaining a callback after a Returns(). (#98)
* [FIX] Handling calls with params argument of value types, thanks to Eric Winkler.
* [FIX] Can now substitute for interfaces implementing System.Windows.IDataObject, thanks to Johan Appelgren.
* [UPDATE] Improved XML doc comments, thanks to David Gardiner.
### 1.5.0 (January 2013)
* [EXPERIMENTAL] Asserting ordered call sequences
* [FIX] Arg.Invoke with four arguments now passes fourth arg correctly (#88). Thanks to Ville Salonen (@VilleSalonen) for finding and patching this.
* [FIX] Substitute objects now use actual implementation for base object methods (Equals, GetHashCode, ToString). Thanks to Robert Moore (@robdmoore) for this contribution. (#77)
* [NEW] Auto-substitute for Task/Task<T>. Task<T> will use substitute rules that T would use. Thanks to Jake Ginnivan (@JakeGinnivan) for this contribution.
* [NEW] Match derived types for generic calls (#97). Thanks to Iain Ballard for this contribution.
* [NEW] Returns now supports passing multiple callbacks, which makes it easier to combine stubbing multiple return values followed by throwing an exception (#99). Thanks to Alexandr Nikitin for this contribution.
### 1.4.3 (August 2012)
* [FIX] Updated to Castle.Core 3.1.0 to fix an issue proxying generic methods with a struct constraint (#83).
### 1.4.2 (July 2012)
* [FIX] Issue using NET40 build on Mono (due to NET45 build tools incompatibility)
### 1.4.1 (June 2012)
* [FIX] Fix matching Nullable<T> arguments when arg value is null. Thanks to Magnus Olstad Hansen (@maggedotno) for this contribution. (#78)
* [UPDATE] Updated to Castle.Core 3.0.0.
### 1.4.0 (May 2012)
* [NEW] [BREAKING] Auto-substitute for types returned from substitutes of delegates/Funcs (follows same auto-substitute rules as for methods and properties). Thanks to Sauli T<>hk<68>p<EFBFBD><70> for implementing this feature. (#52)
* [NEW] Show details of params arguments when displaying received calls. Thanks to Sauli T<>hk<68>p<EFBFBD><70> for implementing this feature. (#65)
* [FIX] Race condition between checking received calls and building the exception could cause nonsensical exception messages like "Expected 5, actually received 5" when called concurrently. (#64)
### 1.3.0 (Nov 2011)
* [NEW] Support for Received(times) to assert a call was received a certain number of times. Thanks to Abi Bellamkonda for this contribution. (#63)
* [FIX] Improved support for calling substitutes from multiple threads. (#62)
### 1.2.1 (Oct 2011)
* [FIX] Some combinations of Arg.Do and Returns() caused incorrect values to be returned. (#59)
* [UPDATE] WCF ServiceContractAttribute no longer applied to proxies. (#60)
* [FIX] Passing null could cause argument actions to fail. (#61)
* [FIX] Calls to virtual methods from constructors of classes being substituted for are no longer recorded, to prevent non-obvious behaviour when calling Returns() on an auto-substituted value. (#57)
### 1.2.0 (Sep 2011)
* [NEW] Arg.Do() syntax for capturing arguments passed to a method and performing some action with them whenever the method is called.
* [NEW] Arg.Invoke() syntax for invoking callbacks passed as arguments to a method whenever the method is called.
* [NEW] Basic support for setting out/ref parameters.
* [FIX] Property behaviour for indexed properties (Issue #53)
* [UPDATE] [BREAKING] Auto-substitute for pure virtual classes, including common ASP.NET web abstractions. Use .Returns(x=>null) to explicitly return null from these members if required. Thanks to Tatham Oddie for original idea and patch, and Krzysztof Kozmic for suggesting and defining which classes would be safe to automatically proxy.
* [UPDATE] Changed layout of package for eventual support for multiple framework targets.
* [FIX] Failure to match calls with ref arguments using ReceivedWithAnyArgs().
* [FIX] Incorrect ambiguous args exception when supplying value type arg specs for object arguments.
### 1.1.0 (May 2011)
* [UPDATE] Updated to Castle.Core 2.5.3.
* [FIX] Fixed bug when raising a delegate event with a null argument.
* [FIX] CallInfo.Arg<T>() now works more reliably, including for null arguments.
* [FIX] Better exception when accidentally calling substitute extension method with a null reference (e.g. foo.Received().Call() when foo is null)
* [UPDATE] Exceptions thrown in custom argument matchers (Arg.Is<T>(x => ...)) will now silently fail to match the argument, rather than allowing exceptions to bubble up.
* [NEW] Support for test fixtures run in parallel.
### 1.0.0 (Dec 2010)
* [FIX] Using Returns(null) for value types throws, rather than returning default(T).
0.9.5 Release Candidate
* [FIX] Fixed bug when trying to return null from a call to a substitute.
* [FIX] Equals() for class substitutes fixed by not intercepting Object methods Equals(), ToString() and GetHashCode().
* [NEW] Raise.Event<THandler>() methods to raise any type of event, including delegates.
* [BREAKING] Raise.Action() methods removed. Use Raise.Event<THandler>() (e.g. Raise.Event<Action>>()).
* [BREAKING] Renamed Raise.Event<TEventArgs>() methods to Raise.EventWith<TEventArgs>().
* [UPDATE] Arg matchers can be specified using more specific, compatible type (Arg.Is<string>(..) for arg of type object).
* [NEW] NSubstitute website and documentation http://nsubstitute.github.com
* [FIX] Formating for argument matchers that take predicate functions.
* [FIX] Match single argument matcher passed to params arg (#34)
* [FIX] Detect ambiguous arg matchers in additional case (#31)
* [FIX] Can modify event handler subscriptions from within event callback
* [UPDATE] Update to Castle.Core 2.5.2
* [FIX] Can substitute for SynchronizationContext in .NET4 (fixed in Castle.Core)
* [NEW] NSubstitute available as NuPack package
### 0.9.0 Beta 1
* [FIX] Now handles argument specifiers used for params arguments correctly
* [UPDATE] Updated to Castle.Core 2.5 final.
### 0.1.3 alpha 4
* [NEW] Support auto/recursive substituting for members that return interfaces or delegates.
* [NEW] Support auto substituting for members that return arrays and strings (return empty values rather than null).
* [NEW] Raise.Event<TEventArgs>() will now attempt to construct arguments with default ctors, so in most cases they will not need to be explictly provided.
* [UPDATE] Added support for raising events with custom delegate types.
* [UPDATE] Formatting for event subscription and unsubscription calls in call received/not received exceptions.
* [UPDATE] Updated to pre-release build of Castle.Core 2.5 to get dynamic proxy to support modopts.
* [FIX] Throw correct exception when raising an event and event handler throws. (Fix by Rodrigo Perera)
* [FIX] Record call as received when it throws an exception from the When..Do callback.
### 0.1.2 alpha 3
* [NEW] Marked non-matching parameters in the actual calls listed for CallNotReceivedException messages.
* [NEW] Added WhenForAnyArgs..Do syntax for callbacks.
* [UPDATE] Updated arg matching to be smarter when matchers are not used for all args.
* [FIX] Fixed bug when substituting for delegates with multiple parameters.
* [FIX] Removed redundant cast operator which sometimes caused the compiler trouble in resolving Raise.Event().
### 0.1.1 alpha 2
* [NEW] Added ReturnsForAnyArgs() extension methods
* [FIX] Compiled for Any CPU to run on x64 platforms
### 0.1.0 alpha
* Initial release

View File

@@ -1,27 +0,0 @@
Copyright (c) 2009 Anthony Egerton (nsubstitute@delfish.com) and David Tchepak (dave@davesquared.net)
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the names of the copyright holders nor the names of
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[ http://www.opensource.org/licenses/bsd-license.php ]

View File

@@ -1,113 +0,0 @@
NSubstitute
========
Visit the [NSubstitute website](http://nsubstitute.github.com) for more information.
### What is it?
NSubstitute is designed as a friendly substitute for .NET mocking libraries.
It is an attempt to satisfy our craving for a mocking library with a succinct syntax that helps us keep the focus on the intention of our tests, rather than on the configuration of our test doubles. We've tried to make the most frequently required operations obvious and easy to use, keeping less usual scenarios discoverable and accessible, and all the while maintaining as much natural language as possible.
Perfect for those new to testing, and for others who would just like to to get their tests written with less noise and fewer lambdas.
### Getting help
If you have questions or feedback on NSubstitute, head on over to the [NSubstitute discussion group](http://groups.google.com/group/nsubstitute).
### Basic use
Let's say we have a basic calculator interface:
public interface ICalculator
{
int Add(int a, int b);
string Mode { get; set; }
event Action PoweringUp;
}
We can ask NSubstitute to create a substitute instance for this type. We could ask for a stub, mock, fake, spy, test double etc., but why bother when we just want to substitute an instance we have some control over?
_calculator = Substitute.For<ICalculator>();
Now we can tell our substitute to return a value for a call:
_calculator.Add(1, 2).Returns(3);
Assert.That(_calculator.Add(1, 2), Is.EqualTo(3));
We can check that our substitute received a call, and did not receive others:
_calculator.Add(1, 2);
_calculator.Received().Add(1, 2);
_calculator.DidNotReceive().Add(5, 7);
If our Received() assertion fails, NSubstitute tries to give us some help as to what the problem might be:
NSubstitute.Exceptions.ReceivedCallsException : Expected to receive a call matching:
Add(1, 2)
Actually received no matching calls.
Received 2 non-matching calls (non-matching arguments indicated with '*' characters):
Add(1, *5*)
Add(*4*, *7*)
We can also work with properties using the Returns syntax we use for methods, or just stick with plain old property setters (for read/write properties):
_calculator.Mode.Returns("DEC");
Assert.That(_calculator.Mode, Is.EqualTo("DEC"));
_calculator.Mode = "HEX";
Assert.That(_calculator.Mode, Is.EqualTo("HEX"));
NSubstitute supports argument matching for setting return values and asserting a call was received:
_calculator.Add(10, -5);
_calculator.Received().Add(10, Arg.Any<int>());
_calculator.Received().Add(10, Arg.Is<int>(x => x < 0));
We can use argument matching as well as passing a function to Returns() to get some more behaviour out of our substitute (possibly too much, but that's your call):
_calculator
.Add(Arg.Any<int>(), Arg.Any<int>())
.Returns(x => (int)x[0] + (int)x[1]);
Assert.That(_calculator.Add(5, 10), Is.EqualTo(15));
Returns() can also be called with multiple arguments to set up a sequence of return values.
_calculator.Mode.Returns("HEX", "DEC", "BIN");
Assert.That(_calculator.Mode, Is.EqualTo("HEX"));
Assert.That(_calculator.Mode, Is.EqualTo("DEC"));
Assert.That(_calculator.Mode, Is.EqualTo("BIN"));
Finally, we can raise events on our substitutes (unfortunately C# dramatically restricts the extent to which this syntax can be cleaned up):
bool eventWasRaised = false;
_calculator.PoweringUp += () => eventWasRaised = true;
_calculator.PoweringUp += Raise.Event<Action>();
Assert.That(eventWasRaised);
### Building
If you have Visual Studio 2008, 2010, 2012, 2013, or 2015 you should be able to compile NSubstitute and run the unit tests using the NUnit GUI or console test runner (see the ThirdParty directory). Note that some tests are marked `[Pending]` and are not meant to pass at present, so it is a good idea to exclude tests in the Pending category from test runs.
To do full builds you'll also need Ruby, as the jekyll gem is used to generate the website.

View File

@@ -1,54 +0,0 @@
The aim of this file is to acknowledge the software projects that have been used to create NSubstitute, particularly those distributed as Open Source Software. They have been invaluable in helping us produce this software.
# Software distributed with/compiled into NSubstitute
## Castle.Core
NSubstitute is built on the Castle.Core library, particularly Castle.DynamicProxy which is used for generating proxies for types and intercepting calls made to them so that NSubstitute can record them.
Castle.Core is maintained by the Castle Project [http://www.castleproject.org/] and is released under the Apache License, Version 2.0 [http://www.apache.org/licenses/LICENSE-2.0.html].
# Software used to help build NSubstitute
## NUnit [http://www.nunit.org/]
NUnit is used for coding and running unit and integration tests for NSubstitute. It is distributed under an open source zlib/libpng based license [http://www.opensource.org/licenses/zlib-license.html].
## Rhino Mocks [http://www.ayende.com/projects/rhino-mocks.aspx]
Used for mocking parts of the NSubstitute mocking framework for testing. It is distributed under the BSD license [http://www.opensource.org/licenses/bsd-license.php].
## Moq [http://moq.me/]
Moq is not used in NSubstitute, but was a great source of inspiration. Moq pioneered Arrange-Act-Assert (AAA) mocking syntax for .NET, as well as removing the distinction between mocks and stubs, both of which have become important parts of NSubstitute. Moq is available under the BSD license [http://www.opensource.org/licenses/bsd-license.php].
## NuPack [http://nupack.codeplex.com/]
Used for packaging NSubstitute for distribution as a nu package. Distributed under the Apache License, Version 2.0 [http://www.apache.org/licenses/LICENSE-2.0.html].
## Jekyll [http://jekyllrb.com/]
Static website generator written in Ruby, used for NSubstitute's website and documentation. Distributed under the MIT license [http://www.opensource.org/licenses/bsd-license.php].
## SyntaxHighlighter [http://alexgorbatchev.com/SyntaxHighlighter/]
Open source, JavaScript, client-side code highlighter used for highlighting code samples on the NSubstitute website. Distributed under the MIT License [http://en.wikipedia.org/wiki/MIT_License] and the GPL [http://www.gnu.org/copyleft/lesser.html].
## FAKE [http://fsharp.github.io/FAKE/]
FAKE (F# Make) is used for NSubstitute's build. It is inspired by `make` and `rake`. FAKE is distributed under a dual Apache 2 / MS-PL license [https://github.com/fsharp/FAKE/blob/master/License.txt].
## Microsoft .NET Framework [http://www.microsoft.com/net/]
NSubstitute is coded in C# and compiled using Microsoft .NET. It can also run and compile under Mono [http://www.mono-project.com], an open source implementation of the open .NET standards for C# and the CLI.
Microsoft's .NET Framework is available under a EULA (and possibly other licenses like MS Reference Source License).
Mono is available under four open source licenses for different parts of the project (including MIT/X11, GPL, MS-Pl). These are described on the project site [http://www.mono-project.com/Licensing].
## Microsoft Ilmerge [http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx]
Used for combining assemblies so NSubstitute can be distributed as a single DLL. Available for use under a EULA as described on the ilmerge site.
## Microsoft Reactive Extensions for .NET (Rx) [http://msdn.microsoft.com/en-us/devlabs/ee794896]
Used to provide .NET 3.5 with some of the neat concurrency helper classes that ship with out of the box with .NET 4.0. Distributed under a EULA [http://msdn.microsoft.com/en-us/devlabs/ff394099].
## 7-Zip [http://www.7-zip.org/]
7-zip is used to ZIP up NSubstitute distributions as part of the automated build process. Distributed under a mixed GNU LGPL / unRAR licence [http://www.7-zip.org/license.txt].
# Other acknowledgements
## Software developers
Yes, you! To everyone who has tried to get better at the craft and science of programming, especially those of you who have talked, tweeted, blogged, screencasted, and/or contributed software or ideas to the community.
No software developers were harmed to any significant extent during the production of NSubstitute, although some had to get by on reduced sleep.

View File

@@ -1,719 +0,0 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>NSubstitute</name>
</assembly>
<members>
<member name="T:NSubstitute.Arg">
<summary>
Argument matchers used for specifying calls to substitutes.
</summary>
</member>
<member name="M:NSubstitute.Arg.Any``1">
<summary>
Match any argument value compatible with type <typeparamref name="T"/>.
</summary>
<typeparam name="T"></typeparam>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Is``1(``0)">
<summary>
Match argument that is equal to <paramref name="value"/>.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Is``1(System.Linq.Expressions.Expression{System.Predicate{``0}})">
<summary>
Match argument that satisfies <paramref name="predicate"/>.
If the <paramref name="predicate"/> throws an exception for an argument it will be treated as non-matching.
</summary>
<typeparam name="T"></typeparam>
<param name="predicate"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Invoke">
<summary>
Invoke any <see cref="T:System.Action"/> argument whenever a matching call is made to the substitute.
</summary>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Invoke``1(``0)">
<summary>
Invoke any <see cref="T:System.Action`1"/> argument with specified argument whenever a matching call is made to the substitute.
</summary>
<typeparam name="T"></typeparam>
<param name="arg"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Invoke``2(``0,``1)">
<summary>
Invoke any <see cref="T:System.Action`2"/> argument with specified arguments whenever a matching call is made to the substitute.
</summary>
<typeparam name="T1"></typeparam>
<typeparam name="T2"></typeparam>
<param name="arg1"></param>
<param name="arg2"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Invoke``3(``0,``1,``2)">
<summary>
Invoke any <see cref="T:System.Action`3"/> argument with specified arguments whenever a matching call is made to the substitute.
</summary>
<typeparam name="T1"></typeparam>
<typeparam name="T2"></typeparam>
<typeparam name="T3"></typeparam>
<param name="arg1"></param>
<param name="arg2"></param>
<param name="arg3"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Invoke``4(``0,``1,``2,``3)">
<summary>
Invoke any <see cref="T:System.Action`4"/> argument with specified arguments whenever a matching call is made to the substitute.
</summary>
<typeparam name="T1"></typeparam>
<typeparam name="T2"></typeparam>
<typeparam name="T3"></typeparam>
<typeparam name="T4"></typeparam>
<param name="arg1"></param>
<param name="arg2"></param>
<param name="arg3"></param>
<param name="arg4"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.InvokeDelegate``1(System.Object[])">
<summary>
Invoke any <typeparamref name="TDelegate"/> argument with specified arguments whenever a matching call is made to the substitute.
</summary>
<typeparam name="TDelegate"></typeparam>
<param name="arguments">Arguments to pass to delegate.</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Do``1(System.Action{``0})">
<summary>
Capture any argument compatible with type <typeparamref name="T"/> and use it to call the <paramref name="useArgument"/> function
whenever a matching call is made to the substitute.
</summary>
<typeparam name="T"></typeparam>
<param name="useArgument"></param>
<returns></returns>
</member>
<member name="T:NSubstitute.Callback">
<summary>
Perform this chain of callbacks and/or always callback when called.
</summary>
</member>
<member name="M:NSubstitute.Callback.First(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Perform as first in chain of callback when called.
</summary>
<param name="doThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callback.Always(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Perform this action always when callback is called.
</summary>
<param name="doThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callback.FirstThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
<summary>
Throw exception returned by function as first callback in chain of callback when called.
</summary>
<param name="throwThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callback.FirstThrow``1(``0)">
<summary>
Throw this exception as first callback in chain of callback when called.
</summary>
<param name="exception"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callback.AlwaysThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
<summary>
Throw exception returned by function always when callback is called.
</summary>
<typeparam name="TException">The type of the exception.</typeparam>
<param name="throwThis">The throw this.</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callback.AlwaysThrow``1(``0)">
<summary>
Throw this exception always when callback is called.
</summary>
<typeparam name="TException">The type of the exception.</typeparam>
<param name="exception">The exception.</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.EndCallbackChain.AndAlways(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Perform the given action for every call.
</summary>
<param name="doThis">The action to perform for every call</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.Then(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Perform this action once in chain of called callbacks.
</summary>
<param name="doThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepDoing(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Keep doing this action after the other callbacks have run.
</summary>
<param name="doThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepThrowing``1(System.Func{NSubstitute.Core.CallInfo,``0})">
<summary>
Keep throwing this exception after the other callbacks have run.
</summary>
<typeparam name="TException"></typeparam>
<param name="throwThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepThrowing``1(``0)">
<summary>
Keep throwing this exception after the other callbacks have run.
</summary>
<typeparam name="TException"></typeparam>
<param name="throwThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
<summary>
Throw exception returned by function once when called in a chain of callbacks.
</summary>
<typeparam name="TException">The type of the exception</typeparam>
<param name="throwThis">Produce the exception to throw for a CallInfo</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenThrow``1(``0)">
<summary>
Throw this exception once when called in a chain of callbacks.
</summary>
<typeparam name="TException">The type of the exception</typeparam>
<param name="exception">The exception to throw</param>
<returns></returns>
</member>
<member name="T:NSubstitute.Core.Arguments.IArgumentMatcher">
<summary>
Provides a specification for arguments for use with <see ctype="Arg.Matches (IArgumentMatcher)" />.
Can additionally implement <see ctype="IDescribeNonMatches" /> to give descriptions when arguments do not match.
</summary>
</member>
<member name="M:NSubstitute.Core.Arguments.IArgumentMatcher.IsSatisfiedBy(System.Object)">
<summary>
Checks whether the <paramref name="argument"/> satisfies the condition of the matcher.
If this throws an exception the argument will be treated as non-matching.
</summary>
<param name="argument"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.IDescribeNonMatches.DescribeFor(System.Object)">
<summary>
Describes how the <paramref name="argument"/> does not match the condition specified by this class, or <see cref="F:System.String.Empty"/>
if a detailed description can not be provided for the argument.
</summary>
<param name="argument"></param>
<returns>Description of the non-match, or <see cref="F:System.String.Empty"/> if no description can be provided.</returns>
</member>
<member name="M:NSubstitute.Core.ConfiguredCall.AndDoes(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Adds a callback to execute for matching calls.
</summary>
<param name="action">an action to call</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.Extensions.Zip``3(System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEnumerable{``1},System.Func{``0,``1,``2})">
<summary>
Combines two enumerables into a new enumerable using the given selector.
</summary>
<typeparam name="TFirst"></typeparam>
<typeparam name="TSecond"></typeparam>
<typeparam name="TResult"></typeparam>
<param name="first"></param>
<param name="second"></param>
<param name="selector"></param>
<returns></returns>
<remarks>
This implementation was sanity-checked against the
<a href="http://msmvps.com/blogs/jon_skeet/archive/2011/01/14/reimplementing-linq-to-objects-part-35-zip.aspx">Edulinq implementation</a> and
<a href="http://blogs.msdn.com/b/ericlippert/archive/2009/05/07/zip-me-up.aspx">Eric Lippert's implementation</a>.
</remarks>
</member>
<member name="M:NSubstitute.Core.Extensions.IsCompatibleWith(System.Object,System.Type)">
<summary>
Checks if the instance can be used when a <paramref name="type"/> is expected.
</summary>
<param name="instance"></param>
<param name="type"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.Extensions.Join(System.Collections.Generic.IEnumerable{System.String},System.String)">
<summary>
Join the <paramref name="strings"/> using <paramref name="seperator"/>.
</summary>
<param name="strings"></param>
<param name="seperator"></param>
<returns></returns>
</member>
<member name="T:NSubstitute.Core.Maybe`1">
<summary>
Particularly poor implementation of Maybe/Option type.
This is just filling an immediate need; use FSharpOption or XSharpx or similar for a
real implementation.
</summary>
<typeparam name="T"></typeparam>
</member>
<member name="T:NSubstitute.Core.RobustThreadLocal`1">
<summary>
Delegates to ThreadLocal&lt;T&gt;, but wraps Value property access in try/catch to swallow ObjectDisposedExceptions.
These can occur if the Value property is accessed from the finalizer thread. Because we can't detect this, we'll
just swallow the exception (the finalizer thread won't be using any of the values from thread local storage anyway).
</summary>
<typeparam name="T"></typeparam>
</member>
<member name="F:NSubstitute.Core.SubstituteConfig.OverrideAllCalls">
<summary>
Standard substitute behaviour; replace all calls with substituted behaviour.
</summary>
</member>
<member name="F:NSubstitute.Core.SubstituteConfig.CallBaseByDefault">
<summary>
Partial substitute; use base behaviour unless explicitly overriden.
</summary>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws(System.Object,System.Exception)">
<summary>
Throw an exception for this call.
</summary>
<param name="value"></param>
<param name="ex">Exception to throw</param>
<returns></returns>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws``1(System.Object)">
<summary>
Throw an exception of the given type for this call.
</summary>
<typeparam name="TException">Type of exception to throw</typeparam>
<param name="value"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws(System.Object,System.Func{NSubstitute.Core.CallInfo,System.Exception})">
<summary>
Throw an exception for this call, as generated by the specified function.
</summary>
<param name="value"></param>
<param name="createException">Func creating exception object</param>
<returns></returns>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs(System.Object,System.Exception)">
<summary>
Throw an exception for this call made with any arguments.
</summary>
<param name="value"></param>
<param name="ex">Exception to throw</param>
<returns></returns>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs``1(System.Object)">
<summary>
Throws an exception of the given type for this call made with any arguments.
</summary>
<typeparam name="TException">Type of exception to throw</typeparam>
<param name="value"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs(System.Object,System.Func{NSubstitute.Core.CallInfo,System.Exception})">
<summary>
Throws an exception for this call made with any arguments, as generated by the specified function.
</summary>
<param name="value"></param>
<param name="createException">Func creating exception object</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Experimental.Received.InOrder(System.Action)">
<summary>
*EXPERIMENTAL* Asserts the calls to the substitutes contained in the given Action were
received by these substitutes in the same order. Calls to property getters are not included
in the assertion.
</summary>
<param name="calls">Action containing calls to substitutes in the expected order</param>
</member>
<member name="T:NSubstitute.Core.Arguments.IArgumentMatcher`1">
<summary>
Provides a specification for arguments for use with <see ctype="Arg.Matches &lt; T &gt;(IArgumentMatcher)" />.
Can additionally implement <see ctype="IDescribeNonMatches" /> to give descriptions when arguments do not match.
</summary>
<typeparam name="T">Matches arguments of type <typeparamref name="T"/> or compatible type.</typeparam>
</member>
<member name="M:NSubstitute.Core.Arguments.IArgumentMatcher`1.IsSatisfiedBy(`0)">
<summary>
Checks whether the <paramref name="argument"/> satisfies the condition of the matcher.
If this throws an exception the argument will be treated as non-matching.
</summary>
<param name="argument"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Extensions.ReturnsForAllExtensions.ReturnsForAll``1(System.Object,``0)">
<summary>
Configure default return value for all methods that return the specified type
</summary>
<typeparam name="T"></typeparam>
<param name = "substitute"></param>
<param name="returnThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Extensions.ReturnsForAllExtensions.ReturnsForAll``1(System.Object,System.Func{NSubstitute.Core.CallInfo,``0})">
<summary>
Configure default return value for all methods that return the specified type, calculated by a function
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<param name="returnThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Received.InOrder(System.Action)">
<summary>
Asserts the calls to the substitutes contained in the given Action were
received by these substitutes in the same order. Calls to property getters are not included
in the assertion.
</summary>
<param name="calls">Action containing calls to substitutes in the expected order</param>
</member>
<member name="T:NSubstitute.Routing.Handlers.ClearLastCallRouterHandler">
<summary>
Clears last call router on SubstitutionContext for routes that do not require it.
</summary>
<remarks>
This is to help prevent static state bleeding over into future calls.
</remarks>
</member>
<member name="M:NSubstitute.Core.CallInfo.Args">
<summary>
Get the arguments passed to this call.
</summary>
<returns>Array of all arguments passed to this call</returns>
</member>
<member name="M:NSubstitute.Core.CallInfo.ArgTypes">
<summary>
Gets the types of all the arguments passed to this call.
</summary>
<returns>Array of types of all arguments passed to this call</returns>
</member>
<member name="M:NSubstitute.Core.CallInfo.Arg``1">
<summary>
Gets the argument of type `T` passed to this call. This will throw if there are no arguments
of this type, or if there is more than one matching argument.
</summary>
<typeparam name="T">The type of the argument to retrieve</typeparam>
<returns>The argument passed to the call, or throws if there is not exactly one argument of this type</returns>
</member>
<member name="M:NSubstitute.Core.CallInfo.ArgAt``1(System.Int32)">
<summary>
Gets the argument passed to this call at the specified position converted to type `T`.
This will throw if there are no arguments, if the argument is out of range or if it
cannot be converted to the specified type.
</summary>
<typeparam name="T">The type of the argument to retrieve</typeparam>
<param name="position"></param>
<returns>The argument passed to the call, or throws if there is not exactly one argument of this type</returns>
</member>
<member name="P:NSubstitute.Core.CallInfo.Item(System.Int32)">
<summary>
Gets the nth argument to this call.
</summary>
<param name="index">Index of argument</param>
<returns>The value of the argument at the given index</returns>
</member>
<member name="M:NSubstitute.Raise.EventWith``1(System.Object,``0)">
<summary>
Raise an event for an <c>EventHandler&lt;TEventArgs&gt;</c> event with the provided <paramref name="sender"/> and <paramref name="eventArgs"/>.
</summary>
</member>
<member name="M:NSubstitute.Raise.EventWith``1(``0)">
<summary>
Raise an event for an <c>EventHandler&lt;TEventArgs&gt;</c> event with the substitute as the sender and the provided <paramref name="eventArgs" />.
</summary>
</member>
<member name="M:NSubstitute.Raise.EventWith``1">
<summary>
Raise an event for an <c>EventHandler&lt;EventArgsT&gt;</c> event with the substitute as the sender
and with a default instance of <typeparamref name="TEventArgs" />.
</summary>
</member>
<member name="M:NSubstitute.Raise.Event">
<summary>
Raise an event for an <c>EventHandler</c> or <c>EventHandler&lt;EventArgs&gt;</c> event with the substitute
as the sender and with empty <c>EventArgs</c>.
</summary>
</member>
<member name="M:NSubstitute.Raise.Event``1(System.Object[])">
<summary>
Raise an event of type <typeparamref name="THandler" /> with the provided arguments. If no arguments are provided
NSubstitute will try to provide reasonable defaults.
</summary>
</member>
<member name="T:NSubstitute.Substitute">
<summary>
Create a substitute for one or more types. For example: <c>Substitute.For&lt;ISomeType&gt;()</c>
</summary>
</member>
<member name="M:NSubstitute.Substitute.For``1(System.Object[])">
<summary>
Substitute for an interface or class.
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
can be recorded or have return values specified.</para>
</summary>
<typeparam name="T">The type of interface or class to substitute.</typeparam>
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
<returns>A substitute for the interface or class.</returns>
</member>
<member name="M:NSubstitute.Substitute.For``2(System.Object[])">
<summary>
<para>Substitute for multiple interfaces or a class that implements an interface. At most one class can be specified.</para>
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
can be recorded or have return values specified.</para>
</summary>
<typeparam name="T1">The type of interface or class to substitute.</typeparam>
<typeparam name="T2">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
<returns>A substitute of type T1, that also implements T2.</returns>
</member>
<member name="M:NSubstitute.Substitute.For``3(System.Object[])">
<summary>
<para>Substitute for multiple interfaces or a class that implements multiple interfaces. At most one class can be specified.</para>
If additional interfaces are required use the <see cref="M:NSubstitute.Substitute.For(System.Type[],System.Object[])"/> overload.
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
can be recorded or have return values specified.</para>
</summary>
<typeparam name="T1">The type of interface or class to substitute.</typeparam>
<typeparam name="T2">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
<typeparam name="T3">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
<returns>A substitute of type T1, that also implements T2 and T3.</returns>
</member>
<member name="M:NSubstitute.Substitute.For(System.Type[],System.Object[])">
<summary>
<para>Substitute for multiple interfaces or a class that implements multiple interfaces. At most one class can be specified.</para>
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
can be recorded or have return values specified.</para>
</summary>
<param name="typesToProxy">The types of interfaces or a type of class and multiple interfaces the substitute should implement.</param>
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
<returns>A substitute implementing the specified types.</returns>
</member>
<member name="M:NSubstitute.Substitute.ForPartsOf``1(System.Object[])">
<summary>
Create a substitute for a class that behaves just like a real instance of the class, but also
records calls made to its virtual members and allows for specific members to be substituted
by using <see cref="M:NSubstitute.Core.WhenCalled`1.DoNotCallBase">When(() =&gt; call).DoNotCallBase()</see> or by
<see cref="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">setting a value to return value</see> for that member.
</summary>
<typeparam name="T">The type to substitute for parts of. Must be a class; not a delegate or interface.</typeparam>
<param name="constructorArguments"></param>
<returns>An instance of the class that will execute real methods when called, but allows parts to be selectively
overridden via `Returns` and `When..DoNotCallBase`.</returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">
<summary>
Set a return value for this call.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Value to return</param>
<param name="returnThese">Optionally return these values next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(``0,System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
<summary>
Set a return value for this call, calculated by the provided function.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Function to calculate the return value</param>
<param name="returnThese">Optionally use these functions next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(``0,``0,``0[])">
<summary>
Set a return value for this call made with any arguments.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Value to return</param>
<param name="returnThese">Optionally return these values next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(``0,System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
<summary>
Set a return value for this call made with any arguments, calculated by the provided function.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Function to calculate the return value</param>
<param name="returnThese">Optionally use these functions next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.Received``1(``0)">
<summary>
Checks this substitute has received the following call.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.Received``1(``0,System.Int32)">
<summary>
Checks this substitute has received the following call the required number of times.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<param name="requiredNumberOfCalls"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.DidNotReceive``1(``0)">
<summary>
Checks this substitute has not received the following call.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReceivedWithAnyArgs``1(``0)">
<summary>
Checks this substitute has received the following call with any arguments.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReceivedWithAnyArgs``1(``0,System.Int32)">
<summary>
Checks this substitute has received the following call with any arguments the required number of times.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<param name="requiredNumberOfCalls"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.DidNotReceiveWithAnyArgs``1(``0)">
<summary>
Checks this substitute has not received the following call with any arguments.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ClearReceivedCalls``1(``0)">
<summary>
Forget all the calls this substitute has received.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<remarks>
Note that this will not clear any results set up for the substitute using Returns().
</remarks>
</member>
<member name="M:NSubstitute.SubstituteExtensions.When``1(``0,System.Action{``0})">
<summary>
Perform an action when this member is called.
Must be followed by <see cref="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})"/> to provide the callback.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<param name="substituteCall"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.WhenForAnyArgs``1(``0,System.Action{``0})">
<summary>
Perform an action when this member is called with any arguments.
Must be followed by <see cref="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})"/> to provide the callback.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<param name="substituteCall"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReceivedCalls``1(``0)">
<summary>
Returns the calls received by this substitute.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.SubstituteFactory.Create(System.Type[],System.Object[])">
<summary>
Create a substitute for the given types.
</summary>
<param name="typesToProxy"></param>
<param name="constructorArguments"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.SubstituteFactory.CreatePartial(System.Type[],System.Object[])">
<summary>
Create an instance of the given types, with calls configured to call the base implementation
where possible. Parts of the instance can be substituted using
<see cref="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">Returns()</see>.
</summary>
<param name="typesToProxy"></param>
<param name="constructorArguments"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Perform this action when called.
</summary>
<param name="callbackWithArguments"></param>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.Do(NSubstitute.Callback)">
<summary>
Perform this configured callcback when called.
</summary>
<param name="callback"></param>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.DoNotCallBase">
<summary>
Do not call the base implementation on future calls. For use with partial substitutes.
</summary>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.Throw(System.Exception)">
<summary>
Throw the specified exception when called.
</summary>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.Throw``1">
<summary>
Throw an exception of the given type when called.
</summary>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.Throw(System.Func{NSubstitute.Core.CallInfo,System.Exception})">
<summary>
Throw an exception generated by the specified function when called.
</summary>
</member>
<member name="M:NSubstitute.ReturnsExtensions.ReturnsExtensions.ReturnsNull``1(``0)">
<summary>
Set null as returned value for this call.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.ReturnsExtensions.ReturnsExtensions.ReturnsNullForAnyArgs``1(``0)">
<summary>
Set null as returned value for this call made with any arguments.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<returns></returns>
</member>
</members>
</doc>

View File

@@ -1,759 +0,0 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>NSubstitute</name>
</assembly>
<members>
<member name="T:NSubstitute.Arg">
<summary>
Argument matchers used for specifying calls to substitutes.
</summary>
</member>
<member name="M:NSubstitute.Arg.Any``1">
<summary>
Match any argument value compatible with type <typeparamref name="T"/>.
</summary>
<typeparam name="T"></typeparam>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Is``1(``0)">
<summary>
Match argument that is equal to <paramref name="value"/>.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Is``1(System.Linq.Expressions.Expression{System.Predicate{``0}})">
<summary>
Match argument that satisfies <paramref name="predicate"/>.
If the <paramref name="predicate"/> throws an exception for an argument it will be treated as non-matching.
</summary>
<typeparam name="T"></typeparam>
<param name="predicate"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Invoke">
<summary>
Invoke any <see cref="T:System.Action"/> argument whenever a matching call is made to the substitute.
</summary>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Invoke``1(``0)">
<summary>
Invoke any <see cref="T:System.Action`1"/> argument with specified argument whenever a matching call is made to the substitute.
</summary>
<typeparam name="T"></typeparam>
<param name="arg"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Invoke``2(``0,``1)">
<summary>
Invoke any <see cref="T:System.Action`2"/> argument with specified arguments whenever a matching call is made to the substitute.
</summary>
<typeparam name="T1"></typeparam>
<typeparam name="T2"></typeparam>
<param name="arg1"></param>
<param name="arg2"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Invoke``3(``0,``1,``2)">
<summary>
Invoke any <see cref="T:System.Action`3"/> argument with specified arguments whenever a matching call is made to the substitute.
</summary>
<typeparam name="T1"></typeparam>
<typeparam name="T2"></typeparam>
<typeparam name="T3"></typeparam>
<param name="arg1"></param>
<param name="arg2"></param>
<param name="arg3"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Invoke``4(``0,``1,``2,``3)">
<summary>
Invoke any <see cref="T:System.Action`4"/> argument with specified arguments whenever a matching call is made to the substitute.
</summary>
<typeparam name="T1"></typeparam>
<typeparam name="T2"></typeparam>
<typeparam name="T3"></typeparam>
<typeparam name="T4"></typeparam>
<param name="arg1"></param>
<param name="arg2"></param>
<param name="arg3"></param>
<param name="arg4"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.InvokeDelegate``1(System.Object[])">
<summary>
Invoke any <typeparamref name="TDelegate"/> argument with specified arguments whenever a matching call is made to the substitute.
</summary>
<typeparam name="TDelegate"></typeparam>
<param name="arguments">Arguments to pass to delegate.</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Do``1(System.Action{``0})">
<summary>
Capture any argument compatible with type <typeparamref name="T"/> and use it to call the <paramref name="useArgument"/> function
whenever a matching call is made to the substitute.
</summary>
<typeparam name="T"></typeparam>
<param name="useArgument"></param>
<returns></returns>
</member>
<member name="T:NSubstitute.Callback">
<summary>
Perform this chain of callbacks and/or always callback when called.
</summary>
</member>
<member name="M:NSubstitute.Callback.First(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Perform as first in chain of callback when called.
</summary>
<param name="doThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callback.Always(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Perform this action always when callback is called.
</summary>
<param name="doThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callback.FirstThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
<summary>
Throw exception returned by function as first callback in chain of callback when called.
</summary>
<param name="throwThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callback.FirstThrow``1(``0)">
<summary>
Throw this exception as first callback in chain of callback when called.
</summary>
<param name="exception"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callback.AlwaysThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
<summary>
Throw exception returned by function always when callback is called.
</summary>
<typeparam name="TException">The type of the exception.</typeparam>
<param name="throwThis">The throw this.</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callback.AlwaysThrow``1(``0)">
<summary>
Throw this exception always when callback is called.
</summary>
<typeparam name="TException">The type of the exception.</typeparam>
<param name="exception">The exception.</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.EndCallbackChain.AndAlways(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Perform the given action for every call.
</summary>
<param name="doThis">The action to perform for every call</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.Then(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Perform this action once in chain of called callbacks.
</summary>
<param name="doThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepDoing(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Keep doing this action after the other callbacks have run.
</summary>
<param name="doThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepThrowing``1(System.Func{NSubstitute.Core.CallInfo,``0})">
<summary>
Keep throwing this exception after the other callbacks have run.
</summary>
<typeparam name="TException"></typeparam>
<param name="throwThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepThrowing``1(``0)">
<summary>
Keep throwing this exception after the other callbacks have run.
</summary>
<typeparam name="TException"></typeparam>
<param name="throwThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
<summary>
Throw exception returned by function once when called in a chain of callbacks.
</summary>
<typeparam name="TException">The type of the exception</typeparam>
<param name="throwThis">Produce the exception to throw for a CallInfo</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenThrow``1(``0)">
<summary>
Throw this exception once when called in a chain of callbacks.
</summary>
<typeparam name="TException">The type of the exception</typeparam>
<param name="exception">The exception to throw</param>
<returns></returns>
</member>
<member name="T:NSubstitute.Core.Arguments.IArgumentMatcher">
<summary>
Provides a specification for arguments for use with <see ctype="Arg.Matches (IArgumentMatcher)" />.
Can additionally implement <see ctype="IDescribeNonMatches" /> to give descriptions when arguments do not match.
</summary>
</member>
<member name="M:NSubstitute.Core.Arguments.IArgumentMatcher.IsSatisfiedBy(System.Object)">
<summary>
Checks whether the <paramref name="argument"/> satisfies the condition of the matcher.
If this throws an exception the argument will be treated as non-matching.
</summary>
<param name="argument"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.IDescribeNonMatches.DescribeFor(System.Object)">
<summary>
Describes how the <paramref name="argument"/> does not match the condition specified by this class, or <see cref="F:System.String.Empty"/>
if a detailed description can not be provided for the argument.
</summary>
<param name="argument"></param>
<returns>Description of the non-match, or <see cref="F:System.String.Empty"/> if no description can be provided.</returns>
</member>
<member name="M:NSubstitute.Core.ConfiguredCall.AndDoes(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Adds a callback to execute for matching calls.
</summary>
<param name="action">an action to call</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.Extensions.Zip``3(System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEnumerable{``1},System.Func{``0,``1,``2})">
<summary>
Combines two enumerables into a new enumerable using the given selector.
</summary>
<typeparam name="TFirst"></typeparam>
<typeparam name="TSecond"></typeparam>
<typeparam name="TResult"></typeparam>
<param name="first"></param>
<param name="second"></param>
<param name="selector"></param>
<returns></returns>
<remarks>
This implementation was sanity-checked against the
<a href="http://msmvps.com/blogs/jon_skeet/archive/2011/01/14/reimplementing-linq-to-objects-part-35-zip.aspx">Edulinq implementation</a> and
<a href="http://blogs.msdn.com/b/ericlippert/archive/2009/05/07/zip-me-up.aspx">Eric Lippert's implementation</a>.
</remarks>
</member>
<member name="M:NSubstitute.Core.Extensions.IsCompatibleWith(System.Object,System.Type)">
<summary>
Checks if the instance can be used when a <paramref name="type"/> is expected.
</summary>
<param name="instance"></param>
<param name="type"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.Extensions.Join(System.Collections.Generic.IEnumerable{System.String},System.String)">
<summary>
Join the <paramref name="strings"/> using <paramref name="seperator"/>.
</summary>
<param name="strings"></param>
<param name="seperator"></param>
<returns></returns>
</member>
<member name="T:NSubstitute.Core.Maybe`1">
<summary>
Particularly poor implementation of Maybe/Option type.
This is just filling an immediate need; use FSharpOption or XSharpx or similar for a
real implementation.
</summary>
<typeparam name="T"></typeparam>
</member>
<member name="T:NSubstitute.Core.RobustThreadLocal`1">
<summary>
Delegates to ThreadLocal&lt;T&gt;, but wraps Value property access in try/catch to swallow ObjectDisposedExceptions.
These can occur if the Value property is accessed from the finalizer thread. Because we can't detect this, we'll
just swallow the exception (the finalizer thread won't be using any of the values from thread local storage anyway).
</summary>
<typeparam name="T"></typeparam>
</member>
<member name="F:NSubstitute.Core.SubstituteConfig.OverrideAllCalls">
<summary>
Standard substitute behaviour; replace all calls with substituted behaviour.
</summary>
</member>
<member name="F:NSubstitute.Core.SubstituteConfig.CallBaseByDefault">
<summary>
Partial substitute; use base behaviour unless explicitly overriden.
</summary>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws(System.Object,System.Exception)">
<summary>
Throw an exception for this call.
</summary>
<param name="value"></param>
<param name="ex">Exception to throw</param>
<returns></returns>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws``1(System.Object)">
<summary>
Throw an exception of the given type for this call.
</summary>
<typeparam name="TException">Type of exception to throw</typeparam>
<param name="value"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws(System.Object,System.Func{NSubstitute.Core.CallInfo,System.Exception})">
<summary>
Throw an exception for this call, as generated by the specified function.
</summary>
<param name="value"></param>
<param name="createException">Func creating exception object</param>
<returns></returns>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs(System.Object,System.Exception)">
<summary>
Throw an exception for this call made with any arguments.
</summary>
<param name="value"></param>
<param name="ex">Exception to throw</param>
<returns></returns>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs``1(System.Object)">
<summary>
Throws an exception of the given type for this call made with any arguments.
</summary>
<typeparam name="TException">Type of exception to throw</typeparam>
<param name="value"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs(System.Object,System.Func{NSubstitute.Core.CallInfo,System.Exception})">
<summary>
Throws an exception for this call made with any arguments, as generated by the specified function.
</summary>
<param name="value"></param>
<param name="createException">Func creating exception object</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Experimental.Received.InOrder(System.Action)">
<summary>
*EXPERIMENTAL* Asserts the calls to the substitutes contained in the given Action were
received by these substitutes in the same order. Calls to property getters are not included
in the assertion.
</summary>
<param name="calls">Action containing calls to substitutes in the expected order</param>
</member>
<member name="T:NSubstitute.Core.Arguments.IArgumentMatcher`1">
<summary>
Provides a specification for arguments for use with <see ctype="Arg.Matches &lt; T &gt;(IArgumentMatcher)" />.
Can additionally implement <see ctype="IDescribeNonMatches" /> to give descriptions when arguments do not match.
</summary>
<typeparam name="T">Matches arguments of type <typeparamref name="T"/> or compatible type.</typeparam>
</member>
<member name="M:NSubstitute.Core.Arguments.IArgumentMatcher`1.IsSatisfiedBy(`0)">
<summary>
Checks whether the <paramref name="argument"/> satisfies the condition of the matcher.
If this throws an exception the argument will be treated as non-matching.
</summary>
<param name="argument"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Extensions.ReturnsForAllExtensions.ReturnsForAll``1(System.Object,``0)">
<summary>
Configure default return value for all methods that return the specified type
</summary>
<typeparam name="T"></typeparam>
<param name = "substitute"></param>
<param name="returnThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Extensions.ReturnsForAllExtensions.ReturnsForAll``1(System.Object,System.Func{NSubstitute.Core.CallInfo,``0})">
<summary>
Configure default return value for all methods that return the specified type, calculated by a function
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<param name="returnThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Received.InOrder(System.Action)">
<summary>
Asserts the calls to the substitutes contained in the given Action were
received by these substitutes in the same order. Calls to property getters are not included
in the assertion.
</summary>
<param name="calls">Action containing calls to substitutes in the expected order</param>
</member>
<member name="T:NSubstitute.Routing.Handlers.ClearLastCallRouterHandler">
<summary>
Clears last call router on SubstitutionContext for routes that do not require it.
</summary>
<remarks>
This is to help prevent static state bleeding over into future calls.
</remarks>
</member>
<member name="M:NSubstitute.Core.CallInfo.Args">
<summary>
Get the arguments passed to this call.
</summary>
<returns>Array of all arguments passed to this call</returns>
</member>
<member name="M:NSubstitute.Core.CallInfo.ArgTypes">
<summary>
Gets the types of all the arguments passed to this call.
</summary>
<returns>Array of types of all arguments passed to this call</returns>
</member>
<member name="M:NSubstitute.Core.CallInfo.Arg``1">
<summary>
Gets the argument of type `T` passed to this call. This will throw if there are no arguments
of this type, or if there is more than one matching argument.
</summary>
<typeparam name="T">The type of the argument to retrieve</typeparam>
<returns>The argument passed to the call, or throws if there is not exactly one argument of this type</returns>
</member>
<member name="M:NSubstitute.Core.CallInfo.ArgAt``1(System.Int32)">
<summary>
Gets the argument passed to this call at the specified position converted to type `T`.
This will throw if there are no arguments, if the argument is out of range or if it
cannot be converted to the specified type.
</summary>
<typeparam name="T">The type of the argument to retrieve</typeparam>
<param name="position"></param>
<returns>The argument passed to the call, or throws if there is not exactly one argument of this type</returns>
</member>
<member name="P:NSubstitute.Core.CallInfo.Item(System.Int32)">
<summary>
Gets the nth argument to this call.
</summary>
<param name="index">Index of argument</param>
<returns>The value of the argument at the given index</returns>
</member>
<member name="M:NSubstitute.Raise.EventWith``1(System.Object,``0)">
<summary>
Raise an event for an <c>EventHandler&lt;TEventArgs&gt;</c> event with the provided <paramref name="sender"/> and <paramref name="eventArgs"/>.
</summary>
</member>
<member name="M:NSubstitute.Raise.EventWith``1(``0)">
<summary>
Raise an event for an <c>EventHandler&lt;TEventArgs&gt;</c> event with the substitute as the sender and the provided <paramref name="eventArgs" />.
</summary>
</member>
<member name="M:NSubstitute.Raise.EventWith``1">
<summary>
Raise an event for an <c>EventHandler&lt;EventArgsT&gt;</c> event with the substitute as the sender
and with a default instance of <typeparamref name="TEventArgs" />.
</summary>
</member>
<member name="M:NSubstitute.Raise.Event">
<summary>
Raise an event for an <c>EventHandler</c> or <c>EventHandler&lt;EventArgs&gt;</c> event with the substitute
as the sender and with empty <c>EventArgs</c>.
</summary>
</member>
<member name="M:NSubstitute.Raise.Event``1(System.Object[])">
<summary>
Raise an event of type <typeparamref name="THandler" /> with the provided arguments. If no arguments are provided
NSubstitute will try to provide reasonable defaults.
</summary>
</member>
<member name="T:NSubstitute.Substitute">
<summary>
Create a substitute for one or more types. For example: <c>Substitute.For&lt;ISomeType&gt;()</c>
</summary>
</member>
<member name="M:NSubstitute.Substitute.For``1(System.Object[])">
<summary>
Substitute for an interface or class.
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
can be recorded or have return values specified.</para>
</summary>
<typeparam name="T">The type of interface or class to substitute.</typeparam>
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
<returns>A substitute for the interface or class.</returns>
</member>
<member name="M:NSubstitute.Substitute.For``2(System.Object[])">
<summary>
<para>Substitute for multiple interfaces or a class that implements an interface. At most one class can be specified.</para>
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
can be recorded or have return values specified.</para>
</summary>
<typeparam name="T1">The type of interface or class to substitute.</typeparam>
<typeparam name="T2">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
<returns>A substitute of type T1, that also implements T2.</returns>
</member>
<member name="M:NSubstitute.Substitute.For``3(System.Object[])">
<summary>
<para>Substitute for multiple interfaces or a class that implements multiple interfaces. At most one class can be specified.</para>
If additional interfaces are required use the <see cref="M:NSubstitute.Substitute.For(System.Type[],System.Object[])"/> overload.
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
can be recorded or have return values specified.</para>
</summary>
<typeparam name="T1">The type of interface or class to substitute.</typeparam>
<typeparam name="T2">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
<typeparam name="T3">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
<returns>A substitute of type T1, that also implements T2 and T3.</returns>
</member>
<member name="M:NSubstitute.Substitute.For(System.Type[],System.Object[])">
<summary>
<para>Substitute for multiple interfaces or a class that implements multiple interfaces. At most one class can be specified.</para>
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
can be recorded or have return values specified.</para>
</summary>
<param name="typesToProxy">The types of interfaces or a type of class and multiple interfaces the substitute should implement.</param>
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
<returns>A substitute implementing the specified types.</returns>
</member>
<member name="M:NSubstitute.Substitute.ForPartsOf``1(System.Object[])">
<summary>
Create a substitute for a class that behaves just like a real instance of the class, but also
records calls made to its virtual members and allows for specific members to be substituted
by using <see cref="M:NSubstitute.Core.WhenCalled`1.DoNotCallBase">When(() =&gt; call).DoNotCallBase()</see> or by
<see cref="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">setting a value to return value</see> for that member.
</summary>
<typeparam name="T">The type to substitute for parts of. Must be a class; not a delegate or interface.</typeparam>
<param name="constructorArguments"></param>
<returns>An instance of the class that will execute real methods when called, but allows parts to be selectively
overridden via `Returns` and `When..DoNotCallBase`.</returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">
<summary>
Set a return value for this call.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Value to return</param>
<param name="returnThese">Optionally return these values next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(``0,System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
<summary>
Set a return value for this call, calculated by the provided function.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Function to calculate the return value</param>
<param name="returnThese">Optionally use these functions next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(System.Threading.Tasks.Task{``0},``0,``0[])">
<summary>
Set a return value for this call. The value(s) to be returned will be wrapped in Tasks.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Value to return. Will be wrapped in a Task</param>
<param name="returnThese">Optionally use these functions next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(System.Threading.Tasks.Task{``0},System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
<summary>
Set a return value for this call, calculated by the provided function. The value(s) to be returned will be wrapped in Tasks.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Function to calculate the return value</param>
<param name="returnThese">Optionally use these functions next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(System.Threading.Tasks.Task{``0},``0,``0[])">
<summary>
Set a return value for this call made with any arguments. The value(s) to be returned will be wrapped in Tasks.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Value to return</param>
<param name="returnThese">Optionally return these values next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(System.Threading.Tasks.Task{``0},System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
<summary>
Set a return value for this call made with any arguments, calculated by the provided function. The value(s) to be returned will be wrapped in Tasks.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Function to calculate the return value</param>
<param name="returnThese">Optionally use these functions next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(``0,``0,``0[])">
<summary>
Set a return value for this call made with any arguments.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Value to return</param>
<param name="returnThese">Optionally return these values next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(``0,System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
<summary>
Set a return value for this call made with any arguments, calculated by the provided function.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Function to calculate the return value</param>
<param name="returnThese">Optionally use these functions next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.Received``1(``0)">
<summary>
Checks this substitute has received the following call.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.Received``1(``0,System.Int32)">
<summary>
Checks this substitute has received the following call the required number of times.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<param name="requiredNumberOfCalls"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.DidNotReceive``1(``0)">
<summary>
Checks this substitute has not received the following call.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReceivedWithAnyArgs``1(``0)">
<summary>
Checks this substitute has received the following call with any arguments.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReceivedWithAnyArgs``1(``0,System.Int32)">
<summary>
Checks this substitute has received the following call with any arguments the required number of times.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<param name="requiredNumberOfCalls"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.DidNotReceiveWithAnyArgs``1(``0)">
<summary>
Checks this substitute has not received the following call with any arguments.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ClearReceivedCalls``1(``0)">
<summary>
Forget all the calls this substitute has received.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<remarks>
Note that this will not clear any results set up for the substitute using Returns().
</remarks>
</member>
<member name="M:NSubstitute.SubstituteExtensions.When``1(``0,System.Action{``0})">
<summary>
Perform an action when this member is called.
Must be followed by <see cref="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})"/> to provide the callback.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<param name="substituteCall"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.WhenForAnyArgs``1(``0,System.Action{``0})">
<summary>
Perform an action when this member is called with any arguments.
Must be followed by <see cref="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})"/> to provide the callback.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<param name="substituteCall"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReceivedCalls``1(``0)">
<summary>
Returns the calls received by this substitute.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.SubstituteFactory.Create(System.Type[],System.Object[])">
<summary>
Create a substitute for the given types.
</summary>
<param name="typesToProxy"></param>
<param name="constructorArguments"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.SubstituteFactory.CreatePartial(System.Type[],System.Object[])">
<summary>
Create an instance of the given types, with calls configured to call the base implementation
where possible. Parts of the instance can be substituted using
<see cref="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">Returns()</see>.
</summary>
<param name="typesToProxy"></param>
<param name="constructorArguments"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Perform this action when called.
</summary>
<param name="callbackWithArguments"></param>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.Do(NSubstitute.Callback)">
<summary>
Perform this configured callcback when called.
</summary>
<param name="callback"></param>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.DoNotCallBase">
<summary>
Do not call the base implementation on future calls. For use with partial substitutes.
</summary>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.Throw(System.Exception)">
<summary>
Throw the specified exception when called.
</summary>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.Throw``1">
<summary>
Throw an exception of the given type when called.
</summary>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.Throw(System.Func{NSubstitute.Core.CallInfo,System.Exception})">
<summary>
Throw an exception generated by the specified function when called.
</summary>
</member>
<member name="M:NSubstitute.ReturnsExtensions.ReturnsExtensions.ReturnsNull``1(``0)">
<summary>
Set null as returned value for this call.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.ReturnsExtensions.ReturnsExtensions.ReturnsNullForAnyArgs``1(``0)">
<summary>
Set null as returned value for this call made with any arguments.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<returns></returns>
</member>
</members>
</doc>

View File

@@ -1,759 +0,0 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>NSubstitute</name>
</assembly>
<members>
<member name="T:NSubstitute.Arg">
<summary>
Argument matchers used for specifying calls to substitutes.
</summary>
</member>
<member name="M:NSubstitute.Arg.Any``1">
<summary>
Match any argument value compatible with type <typeparamref name="T"/>.
</summary>
<typeparam name="T"></typeparam>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Is``1(``0)">
<summary>
Match argument that is equal to <paramref name="value"/>.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Is``1(System.Linq.Expressions.Expression{System.Predicate{``0}})">
<summary>
Match argument that satisfies <paramref name="predicate"/>.
If the <paramref name="predicate"/> throws an exception for an argument it will be treated as non-matching.
</summary>
<typeparam name="T"></typeparam>
<param name="predicate"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Invoke">
<summary>
Invoke any <see cref="T:System.Action"/> argument whenever a matching call is made to the substitute.
</summary>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Invoke``1(``0)">
<summary>
Invoke any <see cref="T:System.Action`1"/> argument with specified argument whenever a matching call is made to the substitute.
</summary>
<typeparam name="T"></typeparam>
<param name="arg"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Invoke``2(``0,``1)">
<summary>
Invoke any <see cref="T:System.Action`2"/> argument with specified arguments whenever a matching call is made to the substitute.
</summary>
<typeparam name="T1"></typeparam>
<typeparam name="T2"></typeparam>
<param name="arg1"></param>
<param name="arg2"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Invoke``3(``0,``1,``2)">
<summary>
Invoke any <see cref="T:System.Action`3"/> argument with specified arguments whenever a matching call is made to the substitute.
</summary>
<typeparam name="T1"></typeparam>
<typeparam name="T2"></typeparam>
<typeparam name="T3"></typeparam>
<param name="arg1"></param>
<param name="arg2"></param>
<param name="arg3"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Invoke``4(``0,``1,``2,``3)">
<summary>
Invoke any <see cref="T:System.Action`4"/> argument with specified arguments whenever a matching call is made to the substitute.
</summary>
<typeparam name="T1"></typeparam>
<typeparam name="T2"></typeparam>
<typeparam name="T3"></typeparam>
<typeparam name="T4"></typeparam>
<param name="arg1"></param>
<param name="arg2"></param>
<param name="arg3"></param>
<param name="arg4"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.InvokeDelegate``1(System.Object[])">
<summary>
Invoke any <typeparamref name="TDelegate"/> argument with specified arguments whenever a matching call is made to the substitute.
</summary>
<typeparam name="TDelegate"></typeparam>
<param name="arguments">Arguments to pass to delegate.</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Arg.Do``1(System.Action{``0})">
<summary>
Capture any argument compatible with type <typeparamref name="T"/> and use it to call the <paramref name="useArgument"/> function
whenever a matching call is made to the substitute.
</summary>
<typeparam name="T"></typeparam>
<param name="useArgument"></param>
<returns></returns>
</member>
<member name="T:NSubstitute.Callback">
<summary>
Perform this chain of callbacks and/or always callback when called.
</summary>
</member>
<member name="M:NSubstitute.Callback.First(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Perform as first in chain of callback when called.
</summary>
<param name="doThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callback.Always(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Perform this action always when callback is called.
</summary>
<param name="doThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callback.FirstThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
<summary>
Throw exception returned by function as first callback in chain of callback when called.
</summary>
<param name="throwThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callback.FirstThrow``1(``0)">
<summary>
Throw this exception as first callback in chain of callback when called.
</summary>
<param name="exception"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callback.AlwaysThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
<summary>
Throw exception returned by function always when callback is called.
</summary>
<typeparam name="TException">The type of the exception.</typeparam>
<param name="throwThis">The throw this.</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callback.AlwaysThrow``1(``0)">
<summary>
Throw this exception always when callback is called.
</summary>
<typeparam name="TException">The type of the exception.</typeparam>
<param name="exception">The exception.</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.EndCallbackChain.AndAlways(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Perform the given action for every call.
</summary>
<param name="doThis">The action to perform for every call</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.Then(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Perform this action once in chain of called callbacks.
</summary>
<param name="doThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepDoing(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Keep doing this action after the other callbacks have run.
</summary>
<param name="doThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepThrowing``1(System.Func{NSubstitute.Core.CallInfo,``0})">
<summary>
Keep throwing this exception after the other callbacks have run.
</summary>
<typeparam name="TException"></typeparam>
<param name="throwThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenKeepThrowing``1(``0)">
<summary>
Keep throwing this exception after the other callbacks have run.
</summary>
<typeparam name="TException"></typeparam>
<param name="throwThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenThrow``1(System.Func{NSubstitute.Core.CallInfo,``0})">
<summary>
Throw exception returned by function once when called in a chain of callbacks.
</summary>
<typeparam name="TException">The type of the exception</typeparam>
<param name="throwThis">Produce the exception to throw for a CallInfo</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Callbacks.ConfiguredCallback.ThenThrow``1(``0)">
<summary>
Throw this exception once when called in a chain of callbacks.
</summary>
<typeparam name="TException">The type of the exception</typeparam>
<param name="exception">The exception to throw</param>
<returns></returns>
</member>
<member name="T:NSubstitute.Core.Arguments.IArgumentMatcher">
<summary>
Provides a specification for arguments for use with <see ctype="Arg.Matches (IArgumentMatcher)" />.
Can additionally implement <see ctype="IDescribeNonMatches" /> to give descriptions when arguments do not match.
</summary>
</member>
<member name="M:NSubstitute.Core.Arguments.IArgumentMatcher.IsSatisfiedBy(System.Object)">
<summary>
Checks whether the <paramref name="argument"/> satisfies the condition of the matcher.
If this throws an exception the argument will be treated as non-matching.
</summary>
<param name="argument"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.IDescribeNonMatches.DescribeFor(System.Object)">
<summary>
Describes how the <paramref name="argument"/> does not match the condition specified by this class, or <see cref="F:System.String.Empty"/>
if a detailed description can not be provided for the argument.
</summary>
<param name="argument"></param>
<returns>Description of the non-match, or <see cref="F:System.String.Empty"/> if no description can be provided.</returns>
</member>
<member name="M:NSubstitute.Core.ConfiguredCall.AndDoes(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Adds a callback to execute for matching calls.
</summary>
<param name="action">an action to call</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.Extensions.Zip``3(System.Collections.Generic.IEnumerable{``0},System.Collections.Generic.IEnumerable{``1},System.Func{``0,``1,``2})">
<summary>
Combines two enumerables into a new enumerable using the given selector.
</summary>
<typeparam name="TFirst"></typeparam>
<typeparam name="TSecond"></typeparam>
<typeparam name="TResult"></typeparam>
<param name="first"></param>
<param name="second"></param>
<param name="selector"></param>
<returns></returns>
<remarks>
This implementation was sanity-checked against the
<a href="http://msmvps.com/blogs/jon_skeet/archive/2011/01/14/reimplementing-linq-to-objects-part-35-zip.aspx">Edulinq implementation</a> and
<a href="http://blogs.msdn.com/b/ericlippert/archive/2009/05/07/zip-me-up.aspx">Eric Lippert's implementation</a>.
</remarks>
</member>
<member name="M:NSubstitute.Core.Extensions.IsCompatibleWith(System.Object,System.Type)">
<summary>
Checks if the instance can be used when a <paramref name="type"/> is expected.
</summary>
<param name="instance"></param>
<param name="type"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.Extensions.Join(System.Collections.Generic.IEnumerable{System.String},System.String)">
<summary>
Join the <paramref name="strings"/> using <paramref name="seperator"/>.
</summary>
<param name="strings"></param>
<param name="seperator"></param>
<returns></returns>
</member>
<member name="T:NSubstitute.Core.Maybe`1">
<summary>
Particularly poor implementation of Maybe/Option type.
This is just filling an immediate need; use FSharpOption or XSharpx or similar for a
real implementation.
</summary>
<typeparam name="T"></typeparam>
</member>
<member name="T:NSubstitute.Core.RobustThreadLocal`1">
<summary>
Delegates to ThreadLocal&lt;T&gt;, but wraps Value property access in try/catch to swallow ObjectDisposedExceptions.
These can occur if the Value property is accessed from the finalizer thread. Because we can't detect this, we'll
just swallow the exception (the finalizer thread won't be using any of the values from thread local storage anyway).
</summary>
<typeparam name="T"></typeparam>
</member>
<member name="F:NSubstitute.Core.SubstituteConfig.OverrideAllCalls">
<summary>
Standard substitute behaviour; replace all calls with substituted behaviour.
</summary>
</member>
<member name="F:NSubstitute.Core.SubstituteConfig.CallBaseByDefault">
<summary>
Partial substitute; use base behaviour unless explicitly overriden.
</summary>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws(System.Object,System.Exception)">
<summary>
Throw an exception for this call.
</summary>
<param name="value"></param>
<param name="ex">Exception to throw</param>
<returns></returns>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws``1(System.Object)">
<summary>
Throw an exception of the given type for this call.
</summary>
<typeparam name="TException">Type of exception to throw</typeparam>
<param name="value"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.Throws(System.Object,System.Func{NSubstitute.Core.CallInfo,System.Exception})">
<summary>
Throw an exception for this call, as generated by the specified function.
</summary>
<param name="value"></param>
<param name="createException">Func creating exception object</param>
<returns></returns>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs(System.Object,System.Exception)">
<summary>
Throw an exception for this call made with any arguments.
</summary>
<param name="value"></param>
<param name="ex">Exception to throw</param>
<returns></returns>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs``1(System.Object)">
<summary>
Throws an exception of the given type for this call made with any arguments.
</summary>
<typeparam name="TException">Type of exception to throw</typeparam>
<param name="value"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.ExceptionExtensions.ExceptionExtensions.ThrowsForAnyArgs(System.Object,System.Func{NSubstitute.Core.CallInfo,System.Exception})">
<summary>
Throws an exception for this call made with any arguments, as generated by the specified function.
</summary>
<param name="value"></param>
<param name="createException">Func creating exception object</param>
<returns></returns>
</member>
<member name="M:NSubstitute.Experimental.Received.InOrder(System.Action)">
<summary>
*EXPERIMENTAL* Asserts the calls to the substitutes contained in the given Action were
received by these substitutes in the same order. Calls to property getters are not included
in the assertion.
</summary>
<param name="calls">Action containing calls to substitutes in the expected order</param>
</member>
<member name="T:NSubstitute.Core.Arguments.IArgumentMatcher`1">
<summary>
Provides a specification for arguments for use with <see ctype="Arg.Matches &lt; T &gt;(IArgumentMatcher)" />.
Can additionally implement <see ctype="IDescribeNonMatches" /> to give descriptions when arguments do not match.
</summary>
<typeparam name="T">Matches arguments of type <typeparamref name="T"/> or compatible type.</typeparam>
</member>
<member name="M:NSubstitute.Core.Arguments.IArgumentMatcher`1.IsSatisfiedBy(`0)">
<summary>
Checks whether the <paramref name="argument"/> satisfies the condition of the matcher.
If this throws an exception the argument will be treated as non-matching.
</summary>
<param name="argument"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Extensions.ReturnsForAllExtensions.ReturnsForAll``1(System.Object,``0)">
<summary>
Configure default return value for all methods that return the specified type
</summary>
<typeparam name="T"></typeparam>
<param name = "substitute"></param>
<param name="returnThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Extensions.ReturnsForAllExtensions.ReturnsForAll``1(System.Object,System.Func{NSubstitute.Core.CallInfo,``0})">
<summary>
Configure default return value for all methods that return the specified type, calculated by a function
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<param name="returnThis"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Received.InOrder(System.Action)">
<summary>
Asserts the calls to the substitutes contained in the given Action were
received by these substitutes in the same order. Calls to property getters are not included
in the assertion.
</summary>
<param name="calls">Action containing calls to substitutes in the expected order</param>
</member>
<member name="T:NSubstitute.Routing.Handlers.ClearLastCallRouterHandler">
<summary>
Clears last call router on SubstitutionContext for routes that do not require it.
</summary>
<remarks>
This is to help prevent static state bleeding over into future calls.
</remarks>
</member>
<member name="M:NSubstitute.Core.CallInfo.Args">
<summary>
Get the arguments passed to this call.
</summary>
<returns>Array of all arguments passed to this call</returns>
</member>
<member name="M:NSubstitute.Core.CallInfo.ArgTypes">
<summary>
Gets the types of all the arguments passed to this call.
</summary>
<returns>Array of types of all arguments passed to this call</returns>
</member>
<member name="M:NSubstitute.Core.CallInfo.Arg``1">
<summary>
Gets the argument of type `T` passed to this call. This will throw if there are no arguments
of this type, or if there is more than one matching argument.
</summary>
<typeparam name="T">The type of the argument to retrieve</typeparam>
<returns>The argument passed to the call, or throws if there is not exactly one argument of this type</returns>
</member>
<member name="M:NSubstitute.Core.CallInfo.ArgAt``1(System.Int32)">
<summary>
Gets the argument passed to this call at the specified position converted to type `T`.
This will throw if there are no arguments, if the argument is out of range or if it
cannot be converted to the specified type.
</summary>
<typeparam name="T">The type of the argument to retrieve</typeparam>
<param name="position"></param>
<returns>The argument passed to the call, or throws if there is not exactly one argument of this type</returns>
</member>
<member name="P:NSubstitute.Core.CallInfo.Item(System.Int32)">
<summary>
Gets the nth argument to this call.
</summary>
<param name="index">Index of argument</param>
<returns>The value of the argument at the given index</returns>
</member>
<member name="M:NSubstitute.Raise.EventWith``1(System.Object,``0)">
<summary>
Raise an event for an <c>EventHandler&lt;TEventArgs&gt;</c> event with the provided <paramref name="sender"/> and <paramref name="eventArgs"/>.
</summary>
</member>
<member name="M:NSubstitute.Raise.EventWith``1(``0)">
<summary>
Raise an event for an <c>EventHandler&lt;TEventArgs&gt;</c> event with the substitute as the sender and the provided <paramref name="eventArgs" />.
</summary>
</member>
<member name="M:NSubstitute.Raise.EventWith``1">
<summary>
Raise an event for an <c>EventHandler&lt;EventArgsT&gt;</c> event with the substitute as the sender
and with a default instance of <typeparamref name="TEventArgs" />.
</summary>
</member>
<member name="M:NSubstitute.Raise.Event">
<summary>
Raise an event for an <c>EventHandler</c> or <c>EventHandler&lt;EventArgs&gt;</c> event with the substitute
as the sender and with empty <c>EventArgs</c>.
</summary>
</member>
<member name="M:NSubstitute.Raise.Event``1(System.Object[])">
<summary>
Raise an event of type <typeparamref name="THandler" /> with the provided arguments. If no arguments are provided
NSubstitute will try to provide reasonable defaults.
</summary>
</member>
<member name="T:NSubstitute.Substitute">
<summary>
Create a substitute for one or more types. For example: <c>Substitute.For&lt;ISomeType&gt;()</c>
</summary>
</member>
<member name="M:NSubstitute.Substitute.For``1(System.Object[])">
<summary>
Substitute for an interface or class.
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
can be recorded or have return values specified.</para>
</summary>
<typeparam name="T">The type of interface or class to substitute.</typeparam>
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
<returns>A substitute for the interface or class.</returns>
</member>
<member name="M:NSubstitute.Substitute.For``2(System.Object[])">
<summary>
<para>Substitute for multiple interfaces or a class that implements an interface. At most one class can be specified.</para>
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
can be recorded or have return values specified.</para>
</summary>
<typeparam name="T1">The type of interface or class to substitute.</typeparam>
<typeparam name="T2">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
<returns>A substitute of type T1, that also implements T2.</returns>
</member>
<member name="M:NSubstitute.Substitute.For``3(System.Object[])">
<summary>
<para>Substitute for multiple interfaces or a class that implements multiple interfaces. At most one class can be specified.</para>
If additional interfaces are required use the <see cref="M:NSubstitute.Substitute.For(System.Type[],System.Object[])"/> overload.
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
can be recorded or have return values specified.</para>
</summary>
<typeparam name="T1">The type of interface or class to substitute.</typeparam>
<typeparam name="T2">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
<typeparam name="T3">An additional interface or class (maximum of one class) the substitute should implement.</typeparam>
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
<returns>A substitute of type T1, that also implements T2 and T3.</returns>
</member>
<member name="M:NSubstitute.Substitute.For(System.Type[],System.Object[])">
<summary>
<para>Substitute for multiple interfaces or a class that implements multiple interfaces. At most one class can be specified.</para>
<para>Be careful when specifying a class, as all non-virtual members will actually be executed. Only virtual members
can be recorded or have return values specified.</para>
</summary>
<param name="typesToProxy">The types of interfaces or a type of class and multiple interfaces the substitute should implement.</param>
<param name="constructorArguments">Arguments required to construct a class being substituted. Not required for interfaces or classes with default constructors.</param>
<returns>A substitute implementing the specified types.</returns>
</member>
<member name="M:NSubstitute.Substitute.ForPartsOf``1(System.Object[])">
<summary>
Create a substitute for a class that behaves just like a real instance of the class, but also
records calls made to its virtual members and allows for specific members to be substituted
by using <see cref="M:NSubstitute.Core.WhenCalled`1.DoNotCallBase">When(() =&gt; call).DoNotCallBase()</see> or by
<see cref="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">setting a value to return value</see> for that member.
</summary>
<typeparam name="T">The type to substitute for parts of. Must be a class; not a delegate or interface.</typeparam>
<param name="constructorArguments"></param>
<returns>An instance of the class that will execute real methods when called, but allows parts to be selectively
overridden via `Returns` and `When..DoNotCallBase`.</returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">
<summary>
Set a return value for this call.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Value to return</param>
<param name="returnThese">Optionally return these values next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(``0,System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
<summary>
Set a return value for this call, calculated by the provided function.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Function to calculate the return value</param>
<param name="returnThese">Optionally use these functions next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(System.Threading.Tasks.Task{``0},``0,``0[])">
<summary>
Set a return value for this call. The value(s) to be returned will be wrapped in Tasks.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Value to return. Will be wrapped in a Task</param>
<param name="returnThese">Optionally use these functions next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.Returns``1(System.Threading.Tasks.Task{``0},System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
<summary>
Set a return value for this call, calculated by the provided function. The value(s) to be returned will be wrapped in Tasks.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Function to calculate the return value</param>
<param name="returnThese">Optionally use these functions next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(System.Threading.Tasks.Task{``0},``0,``0[])">
<summary>
Set a return value for this call made with any arguments. The value(s) to be returned will be wrapped in Tasks.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Value to return</param>
<param name="returnThese">Optionally return these values next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(System.Threading.Tasks.Task{``0},System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
<summary>
Set a return value for this call made with any arguments, calculated by the provided function. The value(s) to be returned will be wrapped in Tasks.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Function to calculate the return value</param>
<param name="returnThese">Optionally use these functions next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(``0,``0,``0[])">
<summary>
Set a return value for this call made with any arguments.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Value to return</param>
<param name="returnThese">Optionally return these values next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReturnsForAnyArgs``1(``0,System.Func{NSubstitute.Core.CallInfo,``0},System.Func{NSubstitute.Core.CallInfo,``0}[])">
<summary>
Set a return value for this call made with any arguments, calculated by the provided function.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<param name="returnThis">Function to calculate the return value</param>
<param name="returnThese">Optionally use these functions next</param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.Received``1(``0)">
<summary>
Checks this substitute has received the following call.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.Received``1(``0,System.Int32)">
<summary>
Checks this substitute has received the following call the required number of times.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<param name="requiredNumberOfCalls"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.DidNotReceive``1(``0)">
<summary>
Checks this substitute has not received the following call.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReceivedWithAnyArgs``1(``0)">
<summary>
Checks this substitute has received the following call with any arguments.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReceivedWithAnyArgs``1(``0,System.Int32)">
<summary>
Checks this substitute has received the following call with any arguments the required number of times.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<param name="requiredNumberOfCalls"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.DidNotReceiveWithAnyArgs``1(``0)">
<summary>
Checks this substitute has not received the following call with any arguments.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ClearReceivedCalls``1(``0)">
<summary>
Forget all the calls this substitute has received.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<remarks>
Note that this will not clear any results set up for the substitute using Returns().
</remarks>
</member>
<member name="M:NSubstitute.SubstituteExtensions.When``1(``0,System.Action{``0})">
<summary>
Perform an action when this member is called.
Must be followed by <see cref="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})"/> to provide the callback.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<param name="substituteCall"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.WhenForAnyArgs``1(``0,System.Action{``0})">
<summary>
Perform an action when this member is called with any arguments.
Must be followed by <see cref="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})"/> to provide the callback.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<param name="substituteCall"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.SubstituteExtensions.ReceivedCalls``1(``0)">
<summary>
Returns the calls received by this substitute.
</summary>
<typeparam name="T"></typeparam>
<param name="substitute"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.SubstituteFactory.Create(System.Type[],System.Object[])">
<summary>
Create a substitute for the given types.
</summary>
<param name="typesToProxy"></param>
<param name="constructorArguments"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.SubstituteFactory.CreatePartial(System.Type[],System.Object[])">
<summary>
Create an instance of the given types, with calls configured to call the base implementation
where possible. Parts of the instance can be substituted using
<see cref="M:NSubstitute.SubstituteExtensions.Returns``1(``0,``0,``0[])">Returns()</see>.
</summary>
<param name="typesToProxy"></param>
<param name="constructorArguments"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.Do(System.Action{NSubstitute.Core.CallInfo})">
<summary>
Perform this action when called.
</summary>
<param name="callbackWithArguments"></param>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.Do(NSubstitute.Callback)">
<summary>
Perform this configured callcback when called.
</summary>
<param name="callback"></param>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.DoNotCallBase">
<summary>
Do not call the base implementation on future calls. For use with partial substitutes.
</summary>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.Throw(System.Exception)">
<summary>
Throw the specified exception when called.
</summary>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.Throw``1">
<summary>
Throw an exception of the given type when called.
</summary>
</member>
<member name="M:NSubstitute.Core.WhenCalled`1.Throw(System.Func{NSubstitute.Core.CallInfo,System.Exception})">
<summary>
Throw an exception generated by the specified function when called.
</summary>
</member>
<member name="M:NSubstitute.ReturnsExtensions.ReturnsExtensions.ReturnsNull``1(``0)">
<summary>
Set null as returned value for this call.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<returns></returns>
</member>
<member name="M:NSubstitute.ReturnsExtensions.ReturnsExtensions.ReturnsNullForAnyArgs``1(``0)">
<summary>
Set null as returned value for this call made with any arguments.
</summary>
<typeparam name="T"></typeparam>
<param name="value"></param>
<returns></returns>
</member>
</members>
</doc>