Changelog History
Page 2
-
v4.15.0 Changes
This version was accidentally published as 4.15.1 due to an intermittent problem with NuGet publishing.
-
v4.14.7 Changes
October 14, 2020๐ Changed
- ๐ Mocks created by
DefaultValue.Mock
now inheritSetupAllProperties
from their "parent" mock (like it says in the XML documentation) (@stakx, #1074)
๐ Fixed
- Setup not triggered due to VB.NET transparently inserting superfluous type conversions into a setup expression (@InteXX, #1067)
- ๐คก Nested mocks created by
Mock.Of<T>()
no longer have their properties stubbed since version 4.14.0 (@vruss, @1071) Verify
fails for recursive setups not explicitly marked asVerifiable
(@killergege, #1073)- ๐คก
Mock.Of<>
fails for COM interop types that are annotated with a[CompilerGenerated]
custom attribute (@killergege, #1072)
- ๐ Mocks created by
-
v4.14.6 Changes
September 30, 2020๐ Fixed
- ๐คก Regression since 4.14.0: setting nested non-overridable properties via
Mock.Of
(@mariotee, #1039)
- ๐คก Regression since 4.14.0: setting nested non-overridable properties via
-
v4.14.5 Changes
July 01, 2020๐ Fixed
- Regression since version 4.11.0:
VerifySet
fails withNullReferenceException
for write-only indexers (@Epicycle23, #1036)
- Regression since version 4.11.0:
-
v4.14.4 Changes
June 24, 2020๐ Fixed
- Regression:
NullReferenceException
on subsequent setup if expression contains null reference (@IanYates83, #1031)
- Regression:
-
v4.14.3 Changes
June 18, 2020๐ Fixed
- ๐คก Regression, Part II:
Verify
behavior change usingDefaultValue.Mock
(@DesrosiersC, #1024)
- ๐คก Regression, Part II:
-
v4.14.2 Changes
June 16, 2020๐ Fixed
- ๐คก Regression:
Verify
behavior change usingDefaultValue.Mock
(@DesrosiersC, #1024)
- ๐คก Regression:
-
v4.14.1 Changes
April 28, 2020โ Added
- ๐ New
SetupSequence
verbs.PassAsync()
and.ThrowsAsync(...)
for async methods withvoid
return type (@fuzzybair, #993)
๐ Fixed
- ๐คก
StackOverflowException
onVerifyAll
when mocked method returns mocked object (@hotchkj, #1012)
- ๐ New
-
v4.14.0 Changes
April 24, 2020โ Added
A mock's setups can now be inspected and individually verified via the new
Mock.Setups
collection andIInvocation.MatchingSetup
property (@stakx, #984-#987, #989, #995, #999)New
.Protected().Setup
andProtected().Verify
method overloads to deal with generic methods (@JmlSaul, #967)Two new public methods in
Times
:bool Validate(int count)
andstring ToString()
(@stakx, 975)
๐ Changed
Attempts to mark conditionals setup as verifiable are now considered an error, since conditional setups are ignored during verification. Calls to
.Verifiable()
on conditional setups are no-ops and can be safely removed. (@stakx, #997)When matching invocations against setups, captured variables nested inside expression trees are now evaluated. Their values likely matter more than their identities. (@stakx, #1000)
๐ Fixed
Regression: Restored
Capture.In
use inmock.Verify(expression, ...)
to extract arguments of previously recorded invocations. (@vgriph, #968; @stakx, #974)Consistency: When mocking a class
C
whose constructor invokes one of its virtual members,Mock.Of<C>()
now operates likenew Mock<C>()
: a record of such invocations is retained in the mock'sInvocations
collection (@stakx, #980)After updating Moq from 4.10.1 to 4.11, mocking NHibernate session throws a
System.NullReferenceException
(@ronenfe, #955)
-
v4.13.1 Changes
October 19, 2019๐ Fixed
SetupAllProperties
does not recognize property as read-write if only setter is overridden (@stakx, #886)๐คก Regression:
InvalidCastException
caused by Moq erroneously reusing a cached auto-mocked (DefaultValue.Mock
) return value for a different generic method instantiation (@BrunoJuchli, #932)AmbiguousMatchException when setting up the property, that hides another one (@ishatalkin, #939)
๐คก
ArgumentException
("Interface not found") when setting upobject.ToString
on an interface mock (@vslynko, #942)๐คก Cannot "return" to original mocked type after downcasting with
Mock.Get
and then upcasting withmock.As<>
(@pjquirk, #943)params
arrays in recursive setup expressions are matched by reference equality instead of by structural equality (@danielcweber, #946)๐คก
mock.SetupProperty
throwsNullReferenceException
when called for partially overridden property (@stakx, #951)