All Versions
107
Latest Version
Avg Release Cycle
40 days
Latest Release
793 days ago
Changelog History
Page 4
Changelog History
Page 4
-
v4.8.1 Changes
January 08, 2018โ Added
- ๐คก C# 7 tuple support for
DefaultValue.Empty
andDefaultValue.Mock
(@stakx, #563)
๐ Changed
- โฌ๏ธ Downgraded
System.Threading.Tasks.Extensions
andSystem.ValueTuple
dependencies to versions 4.3.0 as suggested by @tothdavid in order to improve Moq compatibility with .NET 4.6.1 / help preventMissingMethodException
and similar (@stakx, #571)
๐ Fixed
CallBase
regression with explicitly implemented interface methods (@stakx, #558)
- ๐คก C# 7 tuple support for
-
v4.8.0 Changes
December 24, 2017๐ Same as 4.8.0-rc1 (see below), plus some significant speed improvements.
๐ Changed
- ๐
SetupAllProperties
now fully supports property type recursion / loops in the object graph, thanks to deferred property initialization (@stakx, #550)
- ๐
-
v4.8.0-rc1 Changes
December 08, 2017๐ This is a pre-release version.
โ Added
- ๐ Support for sequential setup of
void
methods (@alexbestul, #463) - ๐ Support for sequential setups (
SetupSequence
) of protected members (@stakx, #493) - ๐ Support for callbacks for methods having
ref
orout
parameters via two new overloads ofCallback
andReturns
(@stakx, #468) - ๐ Improved support for setting up and verifying protected members (including generic methods and methods having by-ref parameters) via the new duck-typing
mock.Protected().As<TAnalog>()
interface (@stakx, #495, #501) - ๐ Support for
ValueTask<TResult>
when using theReturnsAsync
extension methods, similar toTask<TResult>
(@AdamDotNet, #506) - 0๏ธโฃ Special handling for
ValueTask<TResult>
withDefaultValue.Empty
(@stakx, #529) - ๐ Support for custom default value generation strategies besides
DefaultValue.Empty
andDefaultValue.Mock
: Implement custom providers by subclassing eitherDefaultValueProvider
orLookupOrFallbackDefaultValueProvider
, install them by settingMock[Repository].DefaultValueProvider
(@stakx, #533, #536) - ๐ Allow
DefaultValue.Mock
to mockTask<TMockable>
andValueTask<TMockable>
(@stakx, #502) - Match any value for
ref
parameters withIt.Ref<T>.IsAny
(orItExpr.Ref<T>.IsAny
for protected methods) as you would withIt.IsAny<T>()
for regular parameters (@stakx, #537) - ๐คก
Mock.VerifyNoOtherCalls()
to check whether all expected invocations have been verified -- can be used as an alternative toMockBehavior.Strict
(@stakx, #539)
๐ Changed
- ๐ฅ Breaking change:
SetupSequence
now overrides pre-existing setups like all otherSetup
methods do. This means that exhausted sequences no longer fall back to previous setups to produce a "default" action or return value. (@stakx, #476) - Delegates passed to
Returns
are validated a little more strictly than before (return type and parameter count must match with method being set up) (@stakx, #520) - ๐ Change assembly versioning scheme to
major.minor.0.0
to help prevent assembly version conflicts and to reduce the need for binding redirects (@stakx, #554)
๐ Fixed
- โก๏ธ Update a method's invocation count correctly, even when it is set up to throw an exception (@stakx, #473)
- Sequences set up with
SetupSequence
are now thread-safe (@stakx, #476) - ๐ Record calls to methods that are named like event accessors (
add_X
,remove_X
) so they can be verified (@stakx, #488) - ๐ Improve recognition logic for sealed methods so that
Setup
throws when an attempt is made to set one up (@stakx, #497) - Let
SetupAllProperties
skip inaccessible methods (@stakx, #499) - ๐คก Prevent Moq from relying on a mock's implementation of
IEnumerable<T>
(@stakx, #510) - ๐ Verification leaked internal
MockVerificationException
type; remove it (@stakx, #511) - ๐จ Custom matcher properties not printed correctly in error messages (@stakx, #517)
- ๐คก Infinite loop when invoking delegate in
Mock.Of
setup expression (@stakx, #528)
Obsoleted
- ๐
[Matcher]
has been deprecated in favor ofMatch.Create
(@stakx, #514)
- ๐ Support for sequential setup of
-
v4.7.145 Changes
November 06, 2017๐ Changed
- ๐ Moq no longer collects source file information for verification error messages by default. A current .NET Framework regression (https://github.com/Microsoft/dotnet/issues/529) makes this extremely costly, so this is now an opt-in feature; see
Switches.CollectSourceFileInfoForSetups
(@stakx, #515)
โ Added
- ๐คก
Mock.Switches
andMockRepository.Switches
, which allow opting in and out of certain features (@stakx, #515)
- ๐ Moq no longer collects source file information for verification error messages by default. A current .NET Framework regression (https://github.com/Microsoft/dotnet/issues/529) makes this extremely costly, so this is now an opt-in feature; see
-
v4.7.142 Changes
October 11, 2017๐ Changed
- โก๏ธ Update package reference to
Castle.Core
(DynamicProxy) from version 4.2.0 to 4.2.1 due to a regression; see castleproject/Core#309 for details (@stakx, #482)
๐ Fixed
- ๐
TypeLoadException
s ("Method does not have an implementation") caused by the regression above, see e.g. #469 (@stakx, #482)
- โก๏ธ Update package reference to
-
v4.7.137 Changes
September 30, 2017๐ Changed
- โก๏ธ Update package reference to
Castle.Core
(DynamicProxy) from version 4.1.1 to 4.2.0, which uses a new assembly versioning scheme that should eventually reduce assembly version conflicts and the need for assembly binding redirects (@stakx, #459)
๐ Fixed
- ๐คก
mock.Object
should always return the exact same proxy object, regardless of whether the mock has been cast to an interface via.As<T>()
or not (@stakx, #460)
- โก๏ธ Update package reference to
-
v4.7.127 Changes
September 26, 2017๐ Changed
- ๐ป Make setups for inaccessible internal members fail fast by throwing an exception (@stakx, #455)
โ Removed
- ๐ The redundant type
ObsoleteMockException
has been removed (@stakx)
๐ Fixed
- ๐ Make
SetupAllProperties
work correctly for same-typed sibling properties (@stakx, #442) - ๐ Switch back from portable PDBs to classic PDBs for better compatibility of SourceLink with older .NET tools (@stakx, #443)
- ๐คก Make strict mocks recognize that
.CallBase()
can set up a return value, too (@stakx, #450)
-
v4.7.99 Changes
July 17, 2017โ Added
- โ Add
[NeutralResourcesLanguage]
to assembly info for portable library use (@benbillbob, #394) - โ Add portable, SourceLink-ed debugging symbols (PDB) to NuGet package, enabling end users to step into Moq's source code (@stakx, #417)
๐ Changed
- ๐ Move all hardcoded message strings to
Resources.resx
(@stakx, #403) - โก๏ธ Update package reference to
Castle.Core
(DynamicProxy) from version 4.1.0 to 4.1.1 (@stakx, #416) - ๐ Clean up and simplify the build process by merging separate .NET Framework and .NET Standard projects (@stakx, #417)
- ๐ Replace outdated
ReleaseNotes.md
with newCHANGELOG.md
(@stakx, #423)
๐ Fixed
- ๐ Fix member name typo in reflection code (@JohanLarsson, #389)
- ๐คก Make
Interceptor
more thread-safe duringmock.Setup
(@stakx, #392) - ๐ Make abstract events defined in classes work even when
CallBase
is true by suppressingInvokeBase()
(@stakx, #395) - ๐ Allow setting up null return values using
Mock.Of
(@stakx, #396) - ๐ Allow
Mock<T>.Raise
to raise events on child mocks instead of raising no or the wrong event (@stakx, #397) - ๐ Improve specificity of
Setup
/Verify
exception messages for static members and extension methods (@stakx, #400) - ๐คก Prevent internal interception on a mock from changing its
DefaultValue
property (@vladonemo, #411) - Prevent stack overflow in conditional setups (@stakx, #412)
- ๐ Fix
NullReferenceException
caused by internally relying on a mock'sIEnumerable
implementation (@stakx, #413) - ๐ Improve method match accuracy in
ExtractProxyCall
so that the order of setting up methods in an hierarchy of interfaces does not matter (@stakx, #415) - ๐ Improve mockability of C++/CLI interfaces having custom modifiers (
modopt
,modreq
) in their method signatures (@stakx, #416) - ๐คก Make types implementing the same generic type more than two times mockable (@stakx, #416)
- ๐ Fix misreported
Times
in verification error messages (@stakx, #417)
- โ Add
-
v4.7.63 Changes
June 21, 2017๐ Changed
- Ensure that
null
never matches anIt.IsRegex(โฆ)
(@stakx, #385)
๐ Fixed
- ๐ Fix mocking of non-virtual methods via
mock.As<TInterface>()
which was broken by #381 (@stakx, #387)
- Ensure that
-
v4.7.58 Changes
June 21, 2017๐ Fixed
- ๐ Fix formatting inconsistencies for array values in
MockException.Message
(@stakx, #380) - ๐ Fix major "class method vs. interface method" bug introduced by #119 / commit 162a543 (@stakx, #381)
- ๐ Fix mocking for redeclared interface properties (get-set but get-only in base type) (@stakx, #382)
- ๐ Fix formatting inconsistencies for array values in