Skip to content

Latest commit

 

History

History
2202 lines (1523 loc) · 146 KB

changelog.md

File metadata and controls

2202 lines (1523 loc) · 146 KB

Changelog

v4.20.72 (2024-09-07)

Full Changelog

🔨 Other:

  • Question: Sponsorable Attribute in release v4.20.71 #1513

🔀 Merged:

  • Remove unused attribute #1515 (@kzu)

v4.20.71 (2024-09-03)

Full Changelog

🐛 Fixed bugs:

  • Documentation link gives 404 #1495
  • Documentation link is broken #1487

🔨 Other:

  • Documentation Unavailable Online #1473
  • Some source code files is filled with comments like: "Unmerged change from project " #1451
  • Question: would it make sense to call verify all on a strict mock when the mock gets disposed? #1440
  • SponsorLink Integration Makes Moq Unuasable due to PII and GDPR Requirements #1433
  • Default value ILookup<> in loose mode is null #1391
  • Verifying a protected method when the exact parameter types are not statically known #1339

🔀 Merged:

  • Remove spurious unmerged change comment from dotnet format #1499 (@kzu)
  • Fix semantic error in MatchersFixture.cs test #1496 (@go-hoon)
  • Update License.txt to use SPDX identifier for automatic recognition #1471 (@georg-eckert-zeiss)
  • Additional Verify overload #1463 (@bkijonka)

v4.20.70 (2023-11-28)

Full Changelog

🔨 Other:

  • a minor changes to improve the readability #1419
  • Change log is not updated since version 4.18.4 #1406
  • Stop using Moq as a guinea pig to get feedback on and develop SponsorLink #1396
  • Permanently delete all data from SponsorLink's database that has been collected during builds that included Moq (notably any version 4.20.*) #1395
  • SponsorLink is now OSS too and no longer bundled #1384
  • Performance issue with large interfaces #1350

🔀 Merged:

  • A minor negation in GetDelay to make it more readable #1419 #1422 (@iPazooki)
  • Manually update CHANGELOG.md for now #1407 (@kzu)
  • Restore GDPR compliance and privacy #1402 (@DanWillman)
  • Improve performance for mocking interfaces: Cache GetInterfaceMap #1351 (@rauhs)

v4.20.69 (2023-08-11)

Full Changelog

🔨 Other:

  • Trouble to unit test a lambda expression with Moq #1387
  • Strange System.UnauthorizedAccessException during build using latest version #1377
  • Privacy issues with SponsorLink, starting from version 4.20 #1372
  • Upgrading to version 4.20.1 breaks the build #1371
  • Warnings with latest version from SponsorLink #1370
  • Missing License Information In Nuget metadata #1348

🔀 Merged:

  • Remove AWS sponsorship from readme #1383 (@kzu)

v4.20.2 (2023-08-09)

Full Changelog

🐛 Fixed bugs:

  • Remove SponsorLink since it breaks MacOS restore #1375 (@kzu)

🔨 Other:

  • Running unit tests through Rider causes AD0001 : Analyzer 'Moq.SponsorLinker' threw an exception of type 'System.UnauthorizedAccessException' #1369

v4.20.1 (2023-08-08)

Full Changelog

v4.20.0 (2023-08-08)

Full Changelog

🔨 Other:

  • Documentation link in readme is broken #1349

🔀 Merged:

  • fix website url #1364 (@tibel)

v4.20.0-rc (2023-08-04)

Full Changelog

🔨 Other:

  • Async event mocking hides exception #1352

🔀 Merged:

  • Add 💜 SponsorLink support #1363 (@kzu)

v4.20.0-beta (2023-08-03)

Full Changelog

v4.20.0-alpha (2023-08-03)

Full Changelog

✨ Implemented enhancements:

  • Is there a RaiseAsync method for raising Func<..., Task> events? #1310
  • Provide a way to opt out of VerifyAll() #937
  • Set Times expectation on Setup #373
  • Add setup.Verifiable(Times times, [string failMessage]) method #1319 (@stakx)

🐛 Fixed bugs:

  • Verifying a protected generic method that returns a value is broken #1314

🔨 Other:

  • invalid path on linux #1353
  • Thread Safety issue in Moq reported by Infer# report #1347
  • Moq should use CallBase to call default method from interfaces #1345
  • Functionality Request. Verify Mock using the Mock Setup as base. #1344
  • System.ArgumentException : Object of type 'Microsoft.DurableTask.TaskName' cannot be converted to type 'System.String' #1343
  • Appveyor (CI): Strong name signature verification error fails builds & blocks next version release #1340
  • Mocking derived classes of Exception results in .Object being null #1337
  • base class can not be mocked #1332
  • Verify(It.Is<T>(t => t.SomeProperty.Equals("SomeValue")), Times.Exactly(x)) isn't working as expected #1331
  • Add/support Target Framework net7.0 #1327
  • Mock method with Expression as parameter. #1324
  • System.TypeLoadException : Could not load type 'Castle.Core.Internal.CollectionExtensions' from assembly 'Castle.Core, Version=5.0.0.0 after updating to Moq 4.18.4 #1320
  • Weird exception when mocking interface with SignalRHubAttribute applied #1308

🔀 Merged:

  • Revamp structure, apply oss template, cleanup projects/imports #1358 (@kzu)
  • #1340 updated appveyor.yml with workaround to make builds work again #1346 (@david-kalbermatten)
  • Don't throw away generic type arguments in one mock.Protected().Verify<T>() method overload #1325 (@stakx)
  • Use PackageLicenseExpression instead of PackageLicenseUrl #1322 (@wismann)
  • Add Mock<T>.RaiseAsync #1313 (@stakx)
  • Add ThrowsAsync for non-generic ValueTask #1235 (@johnthcall)

v4.18.4 (2022-12-30)

Full Changelog

✨ Implemented enhancements:

  • Improve a exception message for extension methods. #1305
  • Mocking a method that takes an in parameter #1301

🐛 Fixed bugs:

  • .NET Hot Reload breaks mocked interfaces and throws IndexOutOfRangeException #1252

🔨 Other:

  • Ignoring latest setup #1311
  • Invocation count incorrect. Argument object is stored as reference and is changed incorrectly #1309
  • Moq 4.18.3 Release still pending #1302
  • Moq fails when a method with input parameter of type Expression<Func<T,bool>> is called #1288
  • Use Moq as a proxy #1287
  • TargetParameterCountException when using event Raise with Moq #1285
  • Add CITATION.cff file #1266
  • MissingMethodException when using new C# language features (in parameters, init-only setters, etc.) with generic methods, or with members in generic types #1148

🔀 Merged:

  • Update version to 4.18.4 #1318 (@stakx)
  • Update DynamicProxy to version 5.1.1 #1317 (@stakx)

v4.18.3 (2022-12-05)

Full Changelog

🐛 Fixed bugs:

  • SetupAllProperties crashes when invoked on a Mock<T> subclass #1278

🔨 Other:

  • Testing non virtual public methods #1303
  • Mocking dependency with in keyword parameter does not match #1292
  • System.InvalidProgramException : Cannot create boxed ByRef-like values. #1286
  • Does ReturnsAsnyc not available for protected setup? #1264
  • Mocking Static Abstract Interface Methods? #1238

🔀 Merged:

  • Update version to 4.18.3 #1306 (@stakx)
  • Update moved artifacts in upstream repos #1298 (@kzu)
  • Fix typo in the documentation of Mock`1.cs #1 #1294 (@valentin-p)
  • Let StubbedPropertiesSetup figure out type parameter in a less fragile way #1281 (@stakx)
  • +M▼ includes #1280 (@github-actions[bot])
  • Update and maintain list of sponsors automatically #1279 (@kzu)

v4.18.2 (2022-08-02)

Full Changelog

🐛 Fixed bugs:

  • "Expression is not an event add" when using .Raises() #1175

🔨 Other:

  • Improperly throws System.TypeLoadException on mock when a record has a base record on dotnet 6 #1273
  • Performance Issues After Version 4.12.0 #1269
  • Mixing "property behavior" and "Setup for properties" broken (or at least changed) in 4.17.1 #1265
  • MissingMethodException when mocking interface with sealed default implementation #1209
  • Can't raise non-virtual async event #977

🔀 Merged:

  • Add regression test for interface with partial default implementation #1277 (@stakx)
  • Add regression tests for subscribing to & raising redeclared event #1276 (@stakx)
  • Upgrade DynamicProxy to version 5.1.0 for better record type support #1275 (@stakx)
  • add STTE for older target frameworks only #1274 (@tibel)
  • Update README.md #1271 (@harveer07)

v4.18.1 (2022-05-16)

Full Changelog

✨ Implemented enhancements:

  • [Feature Request] Allow to change MockBehavior of mocks #1230

🐛 Fixed bugs:

  • Difference in behavior when mocking async method using .Result vs without #1253
  • Setup property doesn't work as expected #1248
  • Update from 4.13.1 to 4.16.1 lazy evaluation setups fail #1217

🔨 Other:

  • Absence of a clause in the documentation about the lack of support for sealed methods #1256
  • moqthis.com is down #1244
  • Setup return value fails in a constellation with nullable ints #1223

🔀 Merged:

  • Leave quoted (nested) expressions unchanged when evaluating captured variables #1262 (@stakx)
  • Update link to documentation website #1261 (@SeanKilleen)
  • Make StubbedPropertySetup.IsMatch less picky #1260 (@stakx)
  • Allow async .Result setups to return null #1259 (@stakx)

v4.18.0 (2022-05-11)

Full Changelog

🐛 Fixed bugs:

  • Failure when invoking a method with by-ref parameter & mockable return type on a mock with CallBase and DefaultValue.Mock configured #1249
  • Placeholder in exception is not filled out #1246

🔨 Other:

  • sealed method mock calls actual method instead of mocked #1255
  • Unable to call base interface getter with cast without explicit setup. #1254
  • Moq is using Castle.Core which has an old version of System.Net.Http which is vulnerable to "DoS", "Spoofing", "Privilege Escalation", "Authentication Bypass" and "Information Exposure" #1219
  • Can't set up "private protected" properties #1170

🔀 Merged:

  • Upgrade DynamicProxy to version 5.0.0 #1257 (@stakx)
  • Account for by-ref params in MethodExpectation.CreateFrom(Invocation) #1251 (@stakx)
  • Fixed missing placeholder in exception message Resources.TypeNotMockable #1247 (@abatishchev)

v4.17.2 (2022-03-06)

Full Changelog

🐛 Fixed bugs:

  • Property stubs not working on sub mock #1240

🔨 Other:

  • Add support for success condition parameter in When. #1237

🔀 Merged:

  • Make SetupProperty work with recursive expressions again #1241 (@stakx)

v4.17.1 (2022-02-26)

Full Changelog

🐛 Fixed bugs:

  • SetupAllProperties causes mocks to become race-prone #1231
  • Property setups are ignored on mocks instantiated using Mock.Of #1066

🔨 Other:

  • It.IsSubtype<T> doesn't work when T has constraints #1215

🔀 Merged:

  • Create dedicated setup type for SetupAllProperties #1234 (@stakx)

v4.17.0 (2022-02-12)

Full Changelog

✨ Implemented enhancements:

  • Access invocation arguments when using Throws/ThrowsAsync during Setup #1048
  • Enable multi-method setups #1203 (@stakx)

🐛 Fixed bugs:

  • Moq.Verify cant detect Invocation when a method is passed #1225
  • implicit guard too strict; prevents valid user wildcard _ implementations #1199
  • Parameter is invalid in Protected().SetupSet() method #1184
  • Issue mocking Vb.Net class with overloaded property in base class #1153

🔨 Other:

  • Poor error message mocking a non-virtual Set property #1228
  • Calling .Raise raises the event on a new instance of the mocked object #1221
  • Null reference exception when using the "new" keyword with properties #1216
  • Specifying the expected number of occurrences in IsIn() #1214
  • Moq 4.16.1 is not compatible with netcoreapp3.1 #1212
  • Using type matchers with .Callback and .Returns should be forbidden #1205
  • Add README to NuGet package #1194
  • mock.Protected() setup methods fail when argument is of type Expression #1188
  • Mock.Verify susceptible to reference type alterations #1187
  • System.CommandLine CLI parsing library won't call a method on a mocked object #1182
  • When testing a method which overrides a method in the base class, the unit test always passes. #1180
  • The type initializer for 'Moq.Async.AwaitableFactory' threw an exception: Could not load file or assembly 'System.Threading.Tasks.Extensions, Version=4.2.0.1 #1179
  • Need a better way to manage parent class child class relationships #1176
  • Setup a method with argument of interface type doesn't work when a not null instance is passed to that method #1172
  • Extension methods (here: ServiceProviderServiceExtensions.GetRequiredService) may not be used in setup / verification expressions. #1171
  • High severity vulnerabilities identified with the dependency package used in Moq 4.16.1 #1169
  • Expected invocation on the mock should never have been performed, but was 1 times. when upgrading to the latest moq version 4.16.1 from 4.10.0 #1168
  • Missing setter functionality from ProtectedAsMock #1164
  • ProtectedAsMock issues #1162
  • Mock an auto-derived interface with all getter-only properties having settings, too #1158
  • Moq setup mismatches generic methods with derived generic arguments #1157
  • GetHashCode() issues when called from inside constructor of mocked class #1156
  • MissingMethodException when Verify Method with Array of ValueTuple #1154
  • DefaultValue.Mock lazy initialization #1149
  • Test method throwing exception with C# 9.0 init keyword #1147
  • Intermittent System.TypeLoadExceptions and System.Security.VerificationExceptions #1145
  • Using object parameter in callback function in place of It.IsAnyType throws exception #1137
  • Mocking a method with "in" parameter of generic type #1136
  • Get DocFX documentation online #1090
  • Issue with selecting a constructor with null value #969

🔀 Merged:

  • Update Castle.Core (DynamicProxy) to version 4.4.1 #1233 (@stakx)
  • Use same comparison logic in LazyEvalMatcher as in ConstantMatcher #1232 (@stakx)
  • Create basic setup for Jekyll-based documentation website #1208 (@stakx)
  • Disallow use of type matchers in .Callback and .Returns #1206 (@stakx)
  • Combine StubbedProperty{G|S}etterSetup #1204 (@stakx)
  • Make guard against unmatchable matchers less strict to enable user-based wildcard matching #1202 (@adamfk)
  • Refactor SetupCollection towards a smaller & more consistent set of methods #1201 (@stakx)
  • Fix IReturns xml doc #1192 (@adam-knights)
  • Add new Throws overloads that allow arguments to be passed to it #1191 (@adam-knights)
  • fix ProtectedMock fails when arguments are of type Expression #1188 #1189 (@tonyhallett)
  • Use value argument in mock.Protected().SetupSet and ...VerifySet #1186 (@tonyhallett)
  • Fix virtual properties and automocking for mock.Protected().As<>() #1185 (@tonyhallett)
  • Add "set" methods to ProtectedAsMock #1165 (@tonyhallett)
  • Fix InvalidOperationException when mocking class with overloaded property/indexer in base class #1155 (@stakx)

v4.16.1 (2021-02-23)

Full Changelog

✨ Implemented enhancements:

  • Improve error message when verification fails #1138
  • Add .NET Standard 2.1 #1041
  • Support for Mock.Of<T> with not default constructor #963
  • Setup does not throw NotSupportedException when setting up sealed method seen through an interface #453

🐛 Fixed bugs:

  • Property indexers raises ' System.Reflection.AmbiguousMatchException: Ambiguous match found.' exception. #1129

🔨 Other:

  • Callback validation too strict when setting up a task's .Result property #1132
  • Performance with large interfaces #1128
  • Interface Default methods are ignored #972

🔀 Merged:

  • Ensure Returns(InvocationFunc) doesn't throw TargetInvocationException #1141 (@stakx)
  • Improve error message when verification fails #1140 (@bfriesen)
  • Fix type mismatch during callback validation for task .Result setups #1133 (@stakx)
  • Avoid AmbiguousMatchException when interface has indexer besides property #1131 (@mujdatdinc)
  • .CallBase for default interface implementations #1130 (@stakx)
  • Multitarget .NET Standard 2.1 #1042 (@twsl)

v4.16.0 (2021-01-16)

Full Changelog

✨ Implemented enhancements:

  • TypeNotMockable Exception #1112
  • Add ability to set up the .Result of (value) tasks #1126 (@stakx)

🐛 Fixed bugs:

  • System.InvalidOperationException because of call to Verifiable in MockSequence after 4.14.0 #1114

🔨 Other:

  • Please document generic argument matching support for versions prior to 4.13 #1119
  • Verify is not capturing a classes state at the time of invocation. #1118
  • Adding a setup looks like it became an O(n*n) operation since #984 was merged #1110
  • DbSet mocking is broken #1091

🔀 Merged:

  • Create and deconstruct awaitables using dedicated factories (IAwaitableFactory) #1125 (@stakx)
  • Abandon 'Try' pattern in verification methods #1122 (@stakx)
  • Allow marking conditional setups as .Verifiable() once again #1121 (@stakx)
  • Changed TypeNotMockable exception message #1116 (@jacker92)
  • Fix for slow down with many setups on single mock #1111 (@CeesKaas)

v4.15.2 (2020-11-26)

Full Changelog

🔨 Other:

  • moq is not compatible with System.Threading.Tasks.Extensions 4.5.3 or 4.5.4 #1107
  • Hi There, I just updated Moq package from version 4.14.7 to version 4.15.1 and noticed that it broke Unit Tests for my projects. Kindly look into this matter. Thanks in advance, Regards, Asheesh Agrawal #1103
  • VerifyNoOtherCalls is failing a lot for existing tests due to unverified event registrations #1102

🔀 Merged:

  • Updating System.Threading.Tasks.Extensions to 4.5.4 #1108 (@JeffAshton)

v4.15.0 (2020-11-10)

Full Changelog

✨ Implemented enhancements:

  • IInvocation should expose Exception along with ReturnValue #1070
  • Capture with ProtectedSetup #934
  • Add support for nested type matchers #919

🐛 Fixed bugs:

  • SetupProperty fails if property getter and setter are not both defined in mocked type #1017
  • Failure when parameterized Mock.Of<> is used in query comprehension from clause #982

🔨 Other:

  • Slower performance after upgrading from 4.2.1510 to 4.14.7 #1083
  • Issue comparing Expressions when one value is a constant #1054
  • Mock.As behavior change #1051
  • Tag Mock.Object as NotNull (JetBrains.Annotations) #1043
  • MissingMethodException on virtual method with in parameter #988

🔀 Merged:

  • Add a link to sources used for build to description #1101 (@kzu)
  • Update version to 4.15.0 #1100 (@stakx)
  • Minor simplifications #1098 (@kzu)
  • Add support for nested type matchers #1092 (@stakx)
  • Add Discord channel link to improve the experience over Gitter #1089 (@kzu)
  • Enable parameterized Mock.Of<> in query comprehension from clause #1085 (@stakx)
  • Simplify event subscription and remove a remaining inconsistency #1084 (@stakx)
  • Always record calls to += and -= event accessors #1082 (@stakx)
  • Evaluate all captured variables when comparing LINQ expressions #1081 (@stakx)
  • Fix SetupProperty for split properties (where mocked type overrides only the getter) #1079 (@stakx)
  • Add exception property to IInvocation #1077 (@MaStr11)
  • Make Mock.Of<> work with COM interop types that are annotated with [CompilerGenerated] #1076 (@stakx)
  • Don't require inner mock setups to be matched #1075 (@stakx)
  • Make DefaultValue.Mock inherit property stubbing #1074 (@stakx)
  • Remove superfluous Convert nodes added by VB.NET in cases involving constrained generic type parameters #1068 (@stakx)
  • Implement It.Is, It.IsIn, It.IsNotIn with a comparer overload #1064 (@weitzhandler)
  • Add .NET Framework reference assembly packages #1063 (@stakx)
  • Add ReturnValue to IInvocation #921 (@MaStr11)

v4.14.7 (2020-10-14)

Full Changelog

✨ Implemented enhancements:

  • Feature request: Promote Invocation.ReturnValue to IInvocation #920

🐛 Fixed bugs:

  • Verify() fails on items not explicitely marked a Verifiable() #1073
  • Mock.Of of Excel interop classes fails to initialize #1072
  • Setters on deep mocks no longer work after updating to 4.14.6 from old version #1071
  • Callback not raised in mocked subclass #1067

🔨 Other:

  • Unable to chain ReturnsAsync with Verifiable #1057

v4.14.6 (2020-09-30)

Full Changelog

🐛 Fixed bugs:

  • Mock.Of<T>((m) => ...) doesn't play well with Microsoft IOptions<T> #1039

🔨 Other:

  • Unable to build Moq: "The Microsoft.Build.Tasks.Git.LocateRepository task failed unexpectedly." #1060
  • [Feature request] Loose mode for commands and strict for queries. #1056
  • ThrowsAnyAsync<> not validating type #1050
  • Mock methods that take or return a Span<T> #1049
  • Feature request: enable verification of extension-methods calls #1045

🔀 Merged:

  • Update SourceLink build package to 1.0.0 #1062 (@stakx)
  • Fix setting of nested non-overridable properties via Mock.Of #1061 (@stakx)

v4.14.5 (2020-07-01)

Full Changelog

🐛 Fixed bugs:

  • VerifySet breaks with System.NullReferenceException for WriteOnly-Indexed-Properties #1036

🔀 Merged:

  • Fix NullReferenceException when using write-only indexer with VerifySet #1037 (@stakx)
  • Convert SequenceSetup to use Behaviors extracted from MethodCall #1035 (@stakx)
  • Simplify Invocation protocol #1034 (@stakx)
  • Simplify MethodCall's response types #1033 (@stakx)

v4.14.4 (2020-06-24)

Full Changelog

🐛 Fixed bugs:

  • NullReferenceException on subsequent setup if expression contains null reference #1031

🔨 Other:

  • Do we still need to use DynamicProxy's AttributesToAvoidReplicating? #1026

🔀 Merged:

  • Expression execution during override detection must not stop setup from being added #1032 (@stakx)
  • Remove unneeded conditional compilation #1030 (@stakx)
  • No longer need to use AttributesToAvoidReplicating #1029 (@stakx)
  • Upgrade test projects to netcoreapp3.1 #1028 (@stakx)

v4.14.3 (2020-06-18)

Full Changelog

🐛 Fixed bugs:

  • Verify behavior change using DefaultValue.Mock 4.12.0 vs 4.13.0 #1024

🔀 Merged:

  • Mark setups resulting from DefaultValue.Mock as matched #1027 (@stakx)

v4.14.2 (2020-06-16)

Full Changelog

🔨 Other:

  • API Documentation page broken. #1023
  • System.IO.FileNotFoundException thrown when referencing same DLL name with 2 different assembly versions within a single application #1019

🔀 Merged:

  • DefaultValue.Mock should not add redundant setups for already-matched invocations #1025 (@stakx)

v4.14.1 (2020-04-28)

Full Changelog

✨ Implemented enhancements:

  • ISetupSequentialResult doesn't support Pass for async void methods. #993

🐛 Fixed bugs:

  • StackOverflowException on VerifyAll when mocked method returns mocked object #1012

🔨 Other:

  • Function match should catch exception? #1010
  • NullReferenceException in IMatcher.Matches #1005
  • Async Method Support Clean-up #384

🔀 Merged:

  • Prevent stack overflow when verifying cyclic mock object graph #1014 (@stakx)
  • Clean up setup execution method #1013 (@stakx)
  • Update Moq.csproj #1011 (@Saibamen)
  • Added method overloads to ISetupSequentialResult async void methods #1006 (@fuzzybair)

v4.14.0 (2020-04-24)

Full Changelog

✨ Implemented enhancements:

  • Expose Moq.Times' Verify and Kind #970
  • After updating moq from 4.10.1 to 4.11, mocking nhibernate session throws a System.NullReferenceException. #955
  • Callback and Returns: Allow callback parameters to have type object where a type matcher was used #953
  • Expose Mock.Setups, part 4: Mock, fluent setup & inner mock discovery #989 (@stakx)
  • add support for mocking protected generic methods #967 (@JmlSaul)

🐛 Fixed bugs:

  • Capture.In during Verify stopped working when upgrading Moq from 4.10.1 to 4.13.1 #968

🔨 Other:

  • Build fails with error CS8751: Internal error in the C# compiler #994
  • Call times verification change from 4.11.0 #990
  • Mocked method call with multiple specific parameter call returns null #973
  • IDE0008 Use explicit type instead of 'var' #971
  • Maintainer on vacation until mid-March 2020 #966
  • System.NullReferenceException : Object reference not set to an instance of an object. #965
  • How do you mock an IAsyncEnumerable<T> ? #962
  • Update from 4.9.0 to upper version breaks Setup out-param method #960
  • If When(Func<bool> condition) is used to setup a mock, the setup verification is skipped. #959

🔀 Merged:

  • Stop searching for setup when first match found #1004 (@stakx)
  • Evaluate captured variables during expression tree comparison #1000 (@stakx)
  • Expose Mock.Setups, part 6: Replace OriginalSetup with simpler OriginalExpression #999 (@stakx)
  • Fix silent bugs in UpgradePropertyAccessorMethods #998 (@stakx)
  • Make conditionalSetup.Verifiable() an error #997 (@stakx)
  • Expose Mock.Setups, part 5: Simplify fluent setup & inner mock discovery #995 (@stakx)
  • Allow Func<IInvocation,> callback with Returns #992 (@stakx)
  • Expose Mock.Setups, part 3: Individual setup verification #987 (@stakx)
  • Fix regression when verifying SetupAllProperties' setups #986 (@stakx)
  • Expose Mock.Setups, part 2: Match status of setups & invocations #985 (@stakx)
  • Expose Mock.Setups, part 1: Basics #984 (@stakx)
  • Make internal verification API more generic than Verify(), VerifyAll() #983 (@stakx)
  • Mock.Of<Class> shouldn't delete invocations made from Class' ctor #980 (@stakx)
  • Retire FluentMockVisitor #978 (@stakx)
  • Add Times.Validate(count) & Times.ToString() #975 (@stakx)
  • Get Capture.In working again in Verify expressions #974 (@stakx)

v4.13.1 (2019-10-19)

Full Changelog

🐛 Fixed bugs:

  • mock.SetupProperty throws NullReferenceException when called for partially overridden property #951
  • Recursive mocks with different paths #946
  • Original mocked type not included after downcasting and Get #943
  • System.ArgumentException: Interface not found in v.4.13.0 but not before. #942
  • Regression in 4.13.0 #932
  • SetupAllProperties does not recognize property as read-write if only setter is overridden #886
  • AmbiguousMatchException when setting up the property, that hides another one #939 (@ishatalkin)

🔨 Other:

  • Test method throw exeption Castle.DynamicProxy.ProxyGenerationException #941
  • Controller Mock return null for ActionResult other return types like int working fine #936
  • Method not found: 'Void Castle.DynamicProxy.ProxyGenerationOptions.AddDelegateTypeMixin(System.Type)'.. #935
  • Ability to evaluate "verify" after a certain period of time #931
  • Problem when mocking an interface with hidden property of different type #930
  • VerifyAll() setup for mock that no method was called #929
  • Issue while calling Setup (mocked) method which is called from a method that is in Task Factory c# #927
  • Quickstart guide add callback which sets mock setup property #926
  • Can not instantiate proxy of class #924
  • Getting value of property through read-only interface returns default #923
  • 4.13 callback with returns and out parameter ~ bug? #917

🔀 Merged:

  • Fix SetupProperty for partially overridden properties #952 (@stakx)
  • Ensure SetupAllProperties stubs all accessors of partially overridden properties #950 (@stakx)
  • Let InnerMockSetup (i.e. internal setups for cached return values) match generic args exactly instead of by assignment compatibility. #949 (@stakx)
  • Match params arrays in setup/verification expressions using structural equality #948 (@stakx)
  • Enable mock.As<> round-tripping #945 (@stakx)
  • Use correct proxy type in InterfaceProxy #944 (@stakx)

v4.13.0 (2019-08-31)

Full Changelog

✨ Implemented enhancements:

  • Method without setup not return null #897
  • Support expression-based mock creation for constructor calls that takes parameters #884
  • Need a way to verify that code added an event handler to an event #825
  • Invocations.Clear() does not cause Verify to fail. #733
  • Open Generic Method Callback #343
  • #825 event handlers setup and verify #857 (@lepijohnny)

🐛 Fixed bugs:

  • Parameter types are ignored when matching an invoked generic method against setups #903
  • Regression in 4.12.0: SetupAllProperties resets indexer setups #901
  • Moq does not distinguish between distinct events if they have the same name #893
  • Verify throws TargetInvocationException instead of MockException when SetupSequence includes returning a Task.FromException and the mocked method is not called enough times. #883
  • MockDefaultValueProvider will try to set 'Callbase' on auto-generated mocks for delegates. #874
  • SetupAllProperties() and Mock.Of<T> regression in Moq 4.12.0 #870
  • Moq does not mock 'Explicit Interface Implementation' and 'protected virtual' correctly #657

🔨 Other:

  • Strange behavior with dynamic + indexed property #913
  • Permission to wrap & distribute as a COM library under GPLv3? #910
  • Check ReturnsAsync method for null arguments. #909
  • New method matching algorithm introduces behavioral change wrt return types #906
  • Feature to reset setups and event handlers? #889
  • Behavioural change between 4.11 -> 4.12 with CallBase=True and params args #877
  • Project with Moq and explicit dependency on higher System.Threading.Tasks.Extension throw exception!! #873
  • Callback with specific object type fails when not after a Return #872
  • Regression for event subscription between 4.10 and 4.11 #867
  • Linux compilation fails using Mono on Moq 4.8+ #864
  • Intermittent AccessViolationException in Mock<>.Object #860
  • Allow specifying action if setup was not met in strict mode #856
  • System.Threading.Tasks.Dataflow FileLoadException #855
  • Usage of Nunit SameAsConstraint (Is.SameAs(...)) in mock verification leads to incorrect result #853
  • Improve "Member x does not exist" failure message #852
  • SetupAllProperties and SetupProperty behave differently with respect to verification #850

🔀 Merged:

  • Retire .xdoc XML documentation files #916 (@stakx)
  • Add special handling for .ReturnsAsync(null) #915 (@stakx)
  • Improve precision of event accessor method resolution #914 (@stakx)
  • Fix type cast bug in ParamArrayMatcher #912 (@stakx)
  • Simplify code in Match.Matches and It.IsAny<T> #911 (@stakx)
  • Add support for generic type argument matchers (It.IsAnyType and custom matchers) #908 (@stakx)
  • Add test from #343 to regression test suite #907 (@stakx)
  • New algorithm for matching invoked methods against expected methods #904 (@stakx)
  • Fix SetupAllProperties indexer regression & refactor accessor check methods for clarity #902 (@stakx)
  • Fail when implicit conversion operator renders argument matcher unmatchable #900 (@stakx)
  • Uninvoke InnerMockSetup on mock.Invocations.Clear() #899 (@stakx)
  • Uninvoke SequenceSetup on mock.Invocations.Clear() #896 (@stakx)
  • Remove or replace redundant conditional compilation symbols #895 (@stakx)
  • Fix .editorconfig for auto-generated files #894 (@stakx)
  • Make mock event subscription equally strict as regular event subscription #891 (@stakx)
  • Added support for lambda expressions while creating a mock #888 (@frblondin)
  • Fix too-optimistic Task unwrapping logic in Unwrap #885 (@stakx)
  • Merge cleaned-up ExpressionStringBuilder into StringBuilderExtensions #882 (@stakx)
  • Fix ExpressionStringBuilder formatting of ternary conditional operator #881 (@stakx)
  • Fix ExpressionStringBuilder formatting of indexer assignment #880 (@stakx)
  • Format method parameter type list more accurately #879 (@stakx)
  • Fix SetupAllProperties for properties named Item #878 (@stakx)
  • Make post-Returns callback delegate validation more strict #876 (@stakx)
  • fix: Don't attempt to set CallBase on auto-generated mocks for delegates #875 (@dammejed)
  • Fix SetupAllProperties for properties whose name starts with Item #871 (@stakx)
  • Minor grammar correction in Mock.xdoc #863 (@OskarNS)
  • Improve Error message given if protected method is setup with bad arguments #862 (@jessfdm-codes)
  • Let mock.Invocations.Clear() remove traces of earlier invocations more thoroughly #854 (@stakx)

v4.12.0 (2019-06-20)

Full Changelog

✨ Implemented enhancements:

  • Setup sequence doesn't support ReturnsAsync with Func<> #795

🐛 Fixed bugs:

  • VerifyNoOtherCalls causes stack overflow when mock setup returns the mocked object (since 4.11) #846
  • Breaking Change Moq 4.11 - SetupAllProperties() (includes Mock.Of<T>) fails in cases it didn't before #845
  • SetupAllProperties does not setup write-only properties #835

🔨 Other:

  • Can not mock the method with several overloads. #839
  • Moq counts multiple invocations although there is one when using capture #834
  • Moq pre-release version 4.11.0-rc1 #815
  • Clean up XML documentation comments #772
  • Adding Callback to a mock breaks async tests #702

🔀 Merged:

  • Make return values of loose mock setups having no .Returns nor .CallBase more consistent #849 (@stakx)
  • VerifyNoOtherCalls: Prevent stack overflow by remembering already verified mocks #848 (@stakx)
  • Prevent auto-stubbing failure due to inaccessible property accessors #847 (@stakx)
  • Proposal: Prevent capturing arguments on match failure #844 (@ocoanet)
  • Clean up XML documentation #843 (@stakx)
  • Add LINQ to Mocks support for strict mocks #842 (@stakx)
  • Add sequenceSetup.ReturnsAsync(Func<T>) #841 (@stakx)
  • Fix SetupAllProperties to override pre-existing property setups (#837) #840 (@ishimko)
  • Unskip unit tests regarding indexers & matchers #838 (@stakx)
  • Handle write-only properties in SetupAllProperties for strict mocks (fix #835) #836 (@ishimko)
  • Delete obsolete .nuspec file #832 (@stakx)
  • On-demand SetupAllProperties #826 (@ishimko)

v4.11.0 (2019-05-27)

Full Changelog

v4.11.0-rc2 (2019-05-27)

Full Changelog

🐛 Fixed bugs:

  • Regression in 4.11.0-rc1: Unhelpful exception message with SetupProperty #823

🔨 Other:

  • Question about order of Setup #831
  • Mock.Object is slow for some types #830
  • System.NotSupportedException : Cannot create boxed ByRef-like values. #829
  • Repos\moq4\tests\Moq.Tests\MatchExpressionFixture.cs:row 21 #828
  • Targeting Framework Missing / Empty Visual Studio 2017 #827
  • Setup with interpolated strings #821
  • Consider switching to portable PDB symbol files #447

🔀 Merged:

  • Correct error message when attempting to set up an indexer with SetupProperty #824 (@stakx)
  • Adjust default(Times) to Times.AtLeastOnce() #820 (@stakx)
  • Optimize SetupCollection (esp. ToArrayLive) for better performance #819 (@stakx)
  • Simplify interception pipeline #818 (@stakx)
  • Use portable PDB in separate NuGet symbol package #789 (@stakx)

v4.11.0-rc1 (2019-04-19)

Full Changelog

✨ Implemented enhancements:

  • ToString() on SetupPhrase does not return expression #810
  • mock.Protected().Verify method group has no overloads with bool exactParameterMatch #752
  • Incomplete stack trace when exceptions when raising events #738
  • Moq.Protected.Setup() Breaks On Abstract Class with Overloaded Abstract Methods #735
  • Trouble building on OSX #726
  • Mock<T>.Raise only raises events on root object #166

🐛 Fixed bugs:

  • Times.Equals is implemented incorrectly #805
  • Verify gets confused between the same generic and non-generic signature #749
  • ArgumentNullException when verifying method call on EF Core mocked DbContext when the method has not been actually invoked but some DbSet setter has #741
  • InvalidOperationException when specifiying setup on mock with mock containing property of type Nullable<T> #725
  • VerifyAll throws System.InvalidOperationException: 'Nullable object must have a value.' #711
  • Setup gets included in Verify despite being "unreachable" #703
  • Verify can create setups that causes a subsequent VerifyAll to fail #699
  • VerifySet fails on non-trivial property setter #430
  • Recursive property setup overrides previous setups #110

🔨 Other:

  • Castle.DynamicProxy.InvalidProxyConstructorArgumentsException when attempting to Setup or Verify based on a value returned from a mocked property #809
  • in string parameter verifying doesn't work in some cases #808
  • InSequence only works with MockBehavior.Strict and exception thrown is misleading #804
  • Mocking classes doesn`t work #773
  • Re-deprecate [Matcher] attribute? #770
  • Modify object captured by invocation impact the Verify #756
  • Verify calls are made in the correct order #748
  • Add support for detecting unused setups #747
  • Raise event when stubbed property is changed #745
  • How can I mock #743
  • Add .Net Standard 2.0 target #742
  • Prevent proxy types from being generated for an interface #739
  • Unable to resolve IFluentInterface #734
  • CallBase cannot be used with Delegate mocks #731
  • ArgumentOutOfRangeException when setup expression contains indexer access #714
  • Adding a generic ThrowsAsync method #692
  • Use latest version of 'System.Threading.Tasks.Extensions' #690
  • Improve processing of multi-dot (also called "fluent" or "recursive") setup expressions #643

🔀 Merged:

  • Add test from issue to regression test suite #814 (@stakx)
  • Revert binary backward-incompatible changes #813 (@stakx)
  • Add ToString() for fluent setup API objects #812 (@jacob-ewald)
  • It's a library #811 (@stakx)
  • Fix implementation of Times.Equals #806 (@stakx)
  • Consolidate public extension method classes #801 (@stakx)
  • Rectify MockFactory and MockRepository APIs #800 (@stakx)
  • Simplify delegate proxy generation using DynamicProxy #798 (@stakx)
  • Update Castle.Core to version 4.4.0 #797 (@stakx)
  • Match indexers used as arguments in setup expression eagerly #796 (@stakx)
  • Keep InvocationShape argument matchers & expressions in sync #793 (@stakx)
  • Make ConstantMatcher more (but not fully) StackOverflowException-proof #792 (@stakx)
  • Re-deprecate MatcherAttribute #788 (@stakx)
  • Remove Pex interop code #787 (@stakx)
  • Make stringBuilder.AppendValueOf safer #786 (@stakx)
  • Retire the .NET Standard 1.x target #785 (@stakx)
  • Add netstandard2.0 target #784 (@stakx)
  • Manually set up inner mocks should be discoverable by Moq #783 (@stakx)
  • ActionObserver improved support for parameterized base class ctors & additional virtual calls #782 (@stakx)
  • Add fixed test case to regression test suite #781 (@stakx)
  • Arguments in recursive expressions should not be treated like It.IsAny by default #780 (@stakx)
  • Don't list setups in Verify(...) error message #779 (@stakx)
  • Fix regression with incomplete Verify expression validation #778 (@stakx)
  • InvocationShape should be equality-comparable #777 (@stakx)
  • Replace LambdaExpressionPart with InvocationShape #776 (@stakx)
  • Turn AmbientObserver into MatcherObserver #775 (@stakx)
  • Allow raising events on inner mocks #774 (@stakx)
  • Remove catch & (re-) throw in Raise #771 (@stakx)
  • Make AmbientObserver reentrant #769 (@stakx)
  • Make handling of MatchExpression more robust #768 (@stakx)
  • Reconstruct SetupSet and VerifySet expressions from delegates #767 (@stakx)
  • Fix IProxy interface visibility #766 (@stakx)
  • Remove expression execution from Setup and Verify & make them recursive #765 (@stakx)
  • Make System.Object members interceptable by *any* interceptor #764 (@stakx)
  • Thorough aggregation of verification errors & more complete error messages #762 (@stakx)
  • Document that "reachability" bug has been fixed #761 (@stakx)
  • Replace Mock.InnerMocks with InnerMockSetup #760 (@stakx)
  • Import Cleanup and Grouping for the test project #755 (@Shereef)
  • Create a CONTRIBUTING.md #754 (@stakx)
  • Add mock.Protected().Verify overloads with additional exactParameterMatch parameter #753 (@Shereef)
  • Add new mock.Protected().Setup() method overload #751 (@stakx)
  • Verify gets confused between the same generic and non-generic signature #750 (@lepijohnny)
  • De-deprecate [Matcher] attribute #732 (@stakx)

v4.10.1 (2018-12-03)

Full Changelog

✨ Implemented enhancements:

  • error messages don't display the parent class name of an inner class object #727
  • ArgumentNullException on trying to mock indexer setter with more than single index argument #695

🐛 Fixed bugs:

  • CallBase should not be allowed for delegate mocks #706

🔨 Other:

  • Rename License.txt to LICENSE.txt #720
  • net45 target causes major build issues in .NET Framework 4.7 projects #719
  • "Verify" on method called with Parallel.ForEach has the wrong number of calls #715
  • FileNotFoundException: Microsoft.AspNetCore.Razor.Runtime #710
  • NuDoq API documentation is down #701
  • Mocking class with no parameterless ctor #700
  • Cannot set callback on function call that uses default parameter #689

🔀 Merged:

  • Increase version to 4.10.1 #730 (@stakx)
  • Upgrade NuGet dependencies to current versions #729 (@stakx)
  • address #727 #728 (@powerdude)
  • Merge HandleTracking interception aspect into RecordInvocation #723 (@stakx)
  • Enable FluentMockContext to record >1 matcher per invocation #722 (@stakx)
  • Drop System.ValueTuple NuGet dependency #721 (@stakx)
  • Check IsSpecialName for properties & indexers #718 (@stakx)
  • Merge MethodCallReturn into MethodCall #717 (@stakx)
  • Make internal Mock methods non-generic #716 (@stakx)
  • Add tests for Moq compatibility with COM interop type events #713 (@stakx)
  • Add tests for Moq compatibility with F# events #712 (@stakx)
  • CallBase should not be allowed for delegate mocks #708 (@m-wild)
  • Remove Mock.DelegateInterfaceMethod #705 (@stakx)
  • Merge duplicate FluentMockVisitor classes #698 (@stakx)
  • Support indexer with multiple arguments #694 (@idigra)

v4.10.0 (2018-09-08)

Full Changelog

✨ Implemented enhancements:

  • License update to project #669
  • Verify() with custom failure message #650
  • CallBase() is missing on ISetup<T> #615
  • WherePasses and WhereThrows to Linq to Mocks #613
  • Verifiable vs VerifyNoOtherCalls #607
  • Update existing mock using Expression #293
  • Implement verification of event handler attaches and detaches (something like mock.Verify(m => m.Event += callback)) #49
  • MockSequence #21
  • Add VerifyNoOtherCalls to MockFactory #682 (@BlythMeister)
  • Add extensibility point for LINQ expression tree compilation #647 (@stakx)

🐛 Fixed bugs:

  • Verification exception message produces incomplete call expression for delegate mocks #678
  • Verification exception message does include configured setups for delegate mocks #677
  • .Callback(…) after .Returns(…) / .CallBase() causes a variety of issues #668
  • Fluent API allows setting up a second callback that won't get involved if .Throws() is specified too #667
  • Fluent API allows setting the return value twice #666
  • Fluent API allows setting the return value and throwing an exception at the same time #665
  • "Different number of parameters" error when passing to Returns a dynamically compiled Expression #652
  • Recursive setup expression creates ghost setups that make VerifyAll fail #556
  • Heisenberg's virtual property set in ctor with MockBehavior.Strict and VerifyAll #456
  • Use of SetupSet 'forgets' Method Setup #432
  • The use of Action<...> instead of Expression<Action<...>> in the public API causes a variety of problems #414

🔨 Other:

  • SetReturnsDefault not working for Task<> #673
  • Verify does not distinguish between a type and its implemented type in generic methods #660
  • Occational null ref in CreateProxy #653
  • Callback may not be threadsafe (ID10T error) #651
  • Close all stale and dormant issues as "unresolved" #642
  • Setting multiple indexed objects' property directly via Linq fails #314
  • SetupSet problems with It.IsAny<> and indexer properties #218
  • Moq 64bit bad performance #188
  • Bug: Mocks of factories with parameters behave as if you use "It.IsAny(x)" if you mock a function call in the returned object. #147
  • Recursive mocks don't work with argument matching #142

🔀 Merged:

  • Make MockFactory.VerifyMocks do what it says it does #691 (@stakx)
  • Make multi-line comparisons in tests ignorant of CRLF/LF #688 (@stakx)
  • Reformat License.txt so GitHub recognizes it #687 (@stakx)
  • Make VerifyAll ignore setups from SetupAllProperties #684 (@stakx)
  • Verify exception should include complete call expression for delegate mocks #680 (@stakx)
  • Verify exception should report configured setups for delegate mocks #679 (@stakx)
  • Replace parameter list comparison extension methods #676 (@stakx)
  • Add nDoc remark for SetReturnsDefault behaviour #674 (@Albert221)
  • Fix VerifyAll + VerifyNoOtherCalls for sequence setups #672 (@stakx)
  • Introduce new abstract base class Setup #671 (@stakx)
  • Add setup.CallBase() for void methods #664 (@stakx)
  • Make MethodCall classes non-generic #663 (@stakx)
  • Extract invocation matching logic into InvocationShape #662 (@stakx)
  • Move matcher selection logic into MatcherFactory #661 (@stakx)
  • Make VerifyNoOtherCalls take into account previous calls to parameterless Verify() and VerifyAll() #659 (@stakx)
  • Prevent false parameter count mismatch when using compiled methods with Returns #654 (@stakx)
  • Clean up project directory structure #649 (@stakx)
  • Simplify the build process & scripts #648 (@stakx)
  • The condition determining whether a parameter is 'out' parameter is changed #645 (@koutinho)

v4.9.0 (2018-07-13)

Full Changelog

✨ Implemented enhancements:

  • Deep verification of call arguments #560

🐛 Fixed bugs:

  • Mock<T>.CallBase seems to be broken #640

🔨 Other:

  • Write exact values into exception messages #636
  • Upgrade to Castle.Core 4.3.1 once it's available #632

🔀 Merged:

  • Upgrade development dependencies to latest versions #639 (@stakx)
  • Add missing dependency to System.Reflection.Emit #638 (@stakx)
  • Clean up MockException (and deprecate IError along the way) #634 (@stakx)
  • IInvocation and IInvocationList #633 (@stakx)
  • Remove superfluous .StripConversion helper method #631 (@stakx)
  • Replace .ToLambda() conversions with static typing #629 (@stakx)
  • Invocations collection improvements #628 (@Code-Grump)
  • Don't ignore non-public interfaces unconditionally #641 (@stakx)
  • Round-trip floats in diagnostic messages #637 (@stakx)
  • Update Castle.Core to version 4.3.1 #635 (@stakx)
  • Expose invocations #627 (@Code-Grump)

v4.8.3 (2018-06-09)

Full Changelog

✨ Implemented enhancements:

  • C# 7.2 in ValueType parameters are not supported with .NET Standard / Core #605
  • Add missing sequence setup methods ReturnsAsync and ThrowsAsync for ValueTask<TResult> #599

🐛 Fixed bugs:

  • Returns(null) requires explicit typecast in Strict mocks #600
  • ReturnsAsync and ThrowsAsync with delay parameter starts timer at setup #593
  • Usage of ReturnsExtensions.ThrowsAsync() can cause UnobservedTaskException #592

🔨 Other:

  • Upgrade to Castle Core 4.3.0 #623
  • Invalid Callback error when Returns argument has return type object #622
  • It.Is reference types #621
  • Regression in .NET Core? #619
  • Multiple calls to getter (that returns an IEnumerable) returns null 2nd time #618
  • Mock.Of() and MockRepository.VerifyAll() #617
  • Mock Object Won't Return an int (i.e. Value Type) #616
  • Cannot mock protected Dispose(It-IsAny-Bool) on System.ComponentModel.Component #614
  • Moq 4.2 documentation #612
  • Build fails (moq 4.8.2) #611
  • System.TypeInitializationException #610
  • Return default value for not implemented methods for As<> method #609
  • WindsorContainer UsingFactoryMethod broken on upgrade to 4.8.0+ #608
  • Intellisense puts red squiggly under wrong method #604
  • Verify an overloaded method with params string[] #603
  • Q: Verify with It.IsAny for structs? #601
  • Mock.Of<T>() is much slower than new Mock<T> (up to several orders of magnitude) #547
  • Create a CONTRIBUTING.md #471
  • Add benchmarks #388

🔀 Merged:

  • Add missing async methods for sequential setups on ValueTask<> #626 (@stakx)
  • Verify that in parameter modifier is supported #625 (@stakx)
  • Update Castle.Core to version 4.3.0 #624 (@stakx)
  • 'Returns' regression with null function callback #602 (@Caraul)
  • Replace Mock.Of code with 10x faster equivalent #598 (@informatorius)
  • Fixed UnobservedTaskException after using ThrowsAsync. Fixed ReturnsAsync and ThrowsAsync with delay #595 (@snrnats)
  • Added ISetupSequentialResult<TResult>.Returns method overload that support delegate for deferred results #594 (@snrnats)

v4.8.2 (2018-02-23)

Full Changelog

🐛 Fixed bugs:

  • NotImplementedException DynamicProxy2 error when CallBase = true while mocking interfaces again #582
  • Setup cannot invoke callback with different number of parameters in Moq 4.8.1 #572

🔨 Other:

  • Invalid setup on non-virtual member. #590
  • Mock.Object throwing "Castle.DynamicProxy.InvalidProxyConstructorArgumentsException" #589
  • Not able to moq setup 2 different methods with same input parameters #587
  • Reference parameter in virtual method doesn't update correctly when class is mocked #585
  • Fix multiple Mock.Setup() with Expression<Func<T>> invocation #584
  • Need a way to setup a property / method by name #580
  • System.ArgumentException : Invalid callback. Setup on method with 0 parameter(s) cannot invoke callback with different number of parameters (1) #579
  • ValueTuple Package not necessary for .Net 4.7 #578
  • Help required in mocking generic repository #576
  • MissingMethodException / "Method not found" after update to Moq 4.8.0 #566
  • Moq's documentation on NuDoq is stuck at an outdated package version #354

🔀 Merged:

  • Upgrade dependency on System.ValueTuple to version 4.4.0 #591 (@stakx)
  • Ignore CallBase for members of additional interfaces #583 (@stakx)
  • Issue #572 Setup cannot invoke callback with different number of parameters in Moq 4.8.1 #575 (@Caraul)

v4.8.1 (2018-01-08)

Full Changelog

✨ Implemented enhancements:

  • DefaultValue.Empty and DefaultValue.Mock should support C# 7 tuple return types #562

🐛 Fixed bugs:

  • Callbase not working on latest 4.8 version #557

🔨 Other:

  • Support ref returns (c# 7) #568
  • After v4.8.0 upgrade and tests failing with missing netstandard, version=2.0.0.0 #567

🔀 Merged:

  • Downgrade System.ValueTuple & System.Threading.Tasks.Extensions #571 (@stakx)
  • Upgrade NuGet packages to latest available versions #565 (@stakx)
  • Replace some helper data types with tuples #564 (@stakx)
  • Add C# 7 tuple support for DefaultValue.Empty and DefaultValue.Mock #563 (@stakx)
  • Fix CallBase regression with explicitly implemented interface methods #558 (@stakx)

v4.8.0 (2017-12-24)

Full Changelog

✨ Implemented enhancements:

  • Allow the equivalent of It.IsAny with ref parameters in Setup #479
  • SetupSequence is missing for void methods #451
  • Detect method signature mismatch in Setup / Returns #445
  • Can ValueTask IReturnsResult<TMock> extensions be added? #437
  • Unable to mock protected generic method #249
  • SetupSequence is missing for protected members #243
  • Stub protected method with out/ref params #223
  • Support mocking the return value when the type is Task/Task<T> #171
  • How can I mock a function with ref parameter? #105
  • Add support for custom default value generators (i.e. make default value providers part of the public API) #533 (@stakx)
  • Add support for ValueTask<TResult> to DefaultValue.Empty #529 (@stakx)

🐛 Fixed bugs:

  • Custom matcher properties not printed correctly in error messages #516
  • mock.Verify and mock.VerifyAll leak internal MockVerificationException type #507
  • SetupAllProperties tries to set up inaccessible properties #498
  • Setup does not recognize all virtual sealed methods as uninterceptable #496
  • Invocations of methods named add_X or remove_X are not recorded #487
  • Moq should not use a mock's internal implementation of IEnumerable #478
  • Call count doesn't get updated properly when method is configured to throw exception #472
  • SetupSequence() is not thread-safe #467
  • Mock delegate with functional style causes infinite loop #224

🔨 Other:

  • Objects of anonymous types are not matched #552
  • Build script no longer runs xUnit tests for .NET Core 2.0 target #545
  • Add diagnostics for mock method resolutions #505
  • Find out why Moq's performance has become worse since version approx. 4.5 #504
  • Check why there's both MethodCall.ToString and MethodCall.Format, and whether we can drop one of them (ideally including MethodCall.SetFileInfo) #503
  • Consider changing [AssemblyVersion] to major version only (4.0.0.0) to save users from having to configure assembly version redirects #424
  • Loose mock should also return empty for IReadOnlyList<T> #173

🔀 Merged:

  • Adopt assembly versioning scheme 'major.minor.0.0' #554 (@stakx)
  • Build script: Fix xUnit test run for .NET Core #553 (@stakx)
  • Make interface proxy creation twice as fast #551 (@stakx)
  • SetupAllProperties: Defer property initialization #550 (@stakx)
  • Reduce use of reflection in SetupAllProperties #549 (@stakx)
  • Optimize a few aspects of the interception process #546 (@stakx)
  • VerifyNoOtherCalls: fix bugs with multi-dot expressions #544 (@stakx)
  • VerifyNoOtherCalls: Fix bugs with Mock.Of<T> #543 (@stakx)
  • Restore default value provider correctly in FluentMockContext #542 (@stakx)
  • Refactor ImplementedInterfaces contraption #541 (@stakx)
  • Move state (fields) from Mock into Mock<T> #540 (@stakx)
  • Add Mock<T>.VerifyNoOtherCalls() method #539 (@stakx)
  • Improve consistency of type names related to method interception #538 (@stakx)
  • Match any values for ref parameters using It.Ref<TValue>.IsAny / ItExpr.Ref<TValue>.IsAny #537 (@stakx)
  • New LookupOrFallbackDefaultValueProvider base class for custom default value providers #536 (@stakx)
  • Add Empty, Mock properties to DefaultValueProvider #535 (@stakx)
  • Prevent infinite loop when invoking delegate in Mock.Of setup expression #528 (@stakx)
  • Update Times.xdoc #525 (@jason-roberts)
  • Rewrite EmptyDefaultValueProvider to use dictionary lookup for special type handling #524 (@stakx)
  • Simplify and optimize interception #523 (@stakx)
  • Validate delegates passed to Returns more strictly #520 (@stakx)
  • Ensure custom matcher properties print correctly in verification error messages #517 (@stakx)
  • Remove redundant code from matcher infrastructure #514 (@stakx)
  • Apply a few optimizations #513 (@stakx)
  • Minor optimizations in ExpressionStringBuilder #512 (@stakx)
  • Remove leaked MockVerificationException and catch-throw-recatch cycle during verification #511 (@stakx)
  • Prevent Moq from relying on a mock's implementation of IEnumerable<T> #510 (@stakx)
  • Remove Interceptor.calls, ExpressionKey, and SetupKind #509 (@stakx)
  • Get PexProtector out of the debugger's way #508 (@stakx)
  • Add ValueTask extensions #506 (@AdamDotNet)
  • Allow DefaultValue.Mock to mock Task<TMockable> and ValueTask<TMockable> #502 (@stakx)
  • Protected().As<T>(): Fix generic method support #501 (@stakx)
  • Let SetupAllProperties skip inaccessible methods #499 (@stakx)
  • Improve Setup recognition logic for sealed methods #497 (@stakx)
  • Introduce .Protected().As<TDuck>() to perform duck-typed setup and verification of protected members #495 (@stakx)
  • Various refactorings and optimizations #494 (@stakx)
  • Add SetupSequence method group for protected members #493 (@stakx)
  • Increase clarity and minor cleanup in readme #489 (@AndrewLane)
  • Record calls to methods with event accessor-like names #488 (@stakx)
  • Clean up solution and build script regarding unit test projects #485 (@stakx)
  • Reimplement SetupSequence to make it thread-safe #476 (@stakx)
  • Added test to show regression described in #469 #474 (@ADThomsen)
  • Update invocation count correctly, even when setup throws exception #473 (@stakx)
  • Add new Callback and Returns overloads for setting up methods with ref parameters #468 (@stakx)
  • Add support for void sequences (2nd iteration) #463 (@alexbestul)
  • Push to NuGet on tag, not on commit to master branch #462 (@stakx)

v4.8.0-rc1 (2017-12-08)

Full Changelog

✨ Implemented enhancements:

  • Setup/Verifyable With Times #530
  • Implement raising of non-virtual events via Mock<T>.Raise #457
  • OutOfMemoryException thrown when mock is called many times - Option for verification opt-out needed #227
  • Any reason there is no Mock.Of<>() overload with MockBehavior? #154
  • Provide better error reporting in Verify() #84

🔨 Other:

  • Proposal Verifiable return an IVerifier #534
  • It.Is Overload taking a T not a Func #532
  • Calling the same method with the same object does not differentiate the delta at call time #531
  • Moq.SetupGet doesn't work with Mock.Of<> #526
  • SetupSequence and MockBehavior.Strict fails with "All invocations on the mock must have a corresponding setup." #521
  • Regression in .net 4.7.1 #500
  • Moq4 compiled in debug mode? #483
  • MissingManifestResourceException when using 4.6.25-alpha in UAP #274
  • Async callbacks do not respect async/await #256

v4.7.145 (2017-11-06)

Full Changelog

✨ Implemented enhancements:

  • Mock.HasSetup(mock, x => x.Foo) #391
  • Mock.Of or Mock.From function to generate mock from anonymous object #152

🔨 Other:

  • Sporatic TypeLoadException or MissingMethodException during unit test execution #246

🔀 Merged:

  • Turn collection of source file information per setup into an opt-in feature #515 (@stakx)

v4.7.142 (2017-10-10)

Full Changelog

🐛 Fixed bugs:

  • 4.7.137 regression #469

🔨 Other:

  • Upgrade Castle Core package dependency to next released version #470
  • NullReferenceException when calling Verify() on a mock of DbContext with a mocked Set<> property #464
  • I just upgraded to Castle Core v4.2.0 whilst using Moq v4.7.127 and I am getting an assembly binding error #461
  • Crash: when accessing 2nd mocked class object (see example) #449

🔀 Merged:

  • Update Castle.Core to version 4.2.1 #482 (@stakx)

v4.7.137 (2017-09-30)

Full Changelog

🐛 Fixed bugs:

  • As<TInterface> strange behavior #458

🔨 Other:

  • Upgrade to Castle.Core version 4.2.0 #425
  • Worthwhile to add in Quickstart? #230

🔀 Merged:

  • Let .As<T> mocks generate same proxy as the uncast mock #460 (@stakx)
  • Update Castle.Core to version 4.2.0 #459 (@stakx)

v4.7.127 (2017-09-25)

Full Changelog

✨ Implemented enhancements:

  • Support Mock.Get(mock, exp) syntax #229
  • Mock name should be a part of method verification error message #140

🐛 Fixed bugs:

  • Given mock.SetupGet(o => o.Property).CallBase(), strict mocks throw, demanding that the setup provide a return value #448
  • SetupAllProperties 2nd property not mocked #438

🔨 Other:

  • Mocking concrete class that is declared as interface don't use mock any longer #452
  • IMemoryCache mock error #446
  • Issue mocking Entity Framework since 4.7.58 #441
  • Returns not working on UdpClient.Receive() method. #439
  • Setup with ReturnsAsync, need to return passed in value but getting null #435
  • Moq access method failed for internal constructors #434
  • Regression in 4.7.46: overwritten Setup still runs match conditions. #433
  • Cannot use SetupGet on protected virtual property in other project #431
  • Issue with Moq.pdb in version 4.7.99: "Symbol indexes could not be retrieved" #428
  • Can I Use it with dotnet core 1.1 #427
  • Upgrade from 4.2.1409.1722 to 4.2.1507.0118 changed VerifyAll behavior #191
  • Implicit CallBase on internal methods #178
  • Allow hidden methods to be mocked #22

🔀 Merged:

  • Make setups for inaccessible internal members fail fast by throwing an exception #455 (@stakx)
  • Make strict mocks recognize that .CallBase() can set up a return value, too #450 (@stakx)
  • Switch back from portable PDBs to classic PDBs #443 (@stakx)
  • Make SetupAllProperties work correctly for same-typed sibling properties #442 (@stakx)

v4.7.99 (2017-07-17)

Full Changelog

✨ Implemented enhancements:

  • Error message when attempting to mock an extension method #317

🐛 Fixed bugs:

  • Abstract event handlers are not mocked with CallBase=true - System.NotImplementedException is raised #296
  • Times.Never is incorrectly reported in a setup with Times.Exactly #211
  • NullReferenceException when argument implements IEnumerable #169
  • ProxyGenerationException using 3+ observer #167

🔨 Other:

  • I get an error after updating Castle.Core to 4.1.1 #418
  • Internal interception on a mock changes the DefaultValue property #409
  • Clean up & simplify the build process #408
  • Upgrade Castle.Core from 4.1.0 to vNext #402
  • Consistency regarding where exception messages are put: in code vs. in resources file #399
  • Moq in UWP needs NeutralResourcesLanguageAttribute #393
  • Possible regression between 4.7.49 and 4.7.58? #383
  • System.NotSupportedException:“Unsupported expression: n => n” #367
  • Throwing an exception nulls any out parameters #342
  • cannot mock a method to return null using LINQ syntax #337
  • Thread safety issue on setup #326
  • Provide better changelog/release notes #320
  • Setup of method with an IEquatable argument gets lost with newest moq version #319
  • Invoking public method on mocked instance invalidates mock setup on protected method #312
  • Nested asynchronous functions are not executed #300
  • Infinite while for ConditionalContext with InnerMock Property get access #292
  • Moq verify uses objects modified in Returns, rather than what was actually passed in #276
  • Odd behavior in regex matcher with nulls #266
  • InternalsVisibleTo #258
  • TypeLoadException while mocking mixed code interface that contains a method with 'const char' parameter. #244
  • Fix issue #163 - Use the "Protected" extensions to test non-protected members #240
  • Mock<T>.Raise doesn't work although InternalsVisibleTo is set #231
  • When mocking a class, why are non-virtual methods hidden in the generated proxy? #212
  • [NuGET] Some packages are not compatible with UAP,Version=v10.0 (win10-x64-aot) #195
  • Can I attach an attribute to mocked properties? #190
  • Allow Strict behavior with CallBase = true #181
  • Can we package the PDB in the NuGet Drop? #170
  • Verify fails to recognize subclass as type argument for generic method when mock invoked in supporting method #151
  • Is there a reason why It.Is only accepts an expression, thus breaking type inference? #150
  • Mock.Of async expression #139
  • The result of setting up methods in an hierarchy of interfaces depends on the order by which they're set up #131
  • SetupSet on hierarchy #124
  • NullReferenceException thrown by Microsoft.CSharp when using Generic Interfaces and Dynamic #114
  • Provide a quickstart that actually compiles #112
  • Issue with System.Reflection.Missing object passed as an argument to mocked Method #107
  • Support for Xamarin.iOS and Xamarin.Android #102
  • Moq still doesn't support multithreading #91
  • ref keyword in interface method declaration causes exception #42

🔀 Merged:

  • Replace outdated release notes with new changelog #423 (@stakx)
  • Add regression test for issue #421 #422 (@kgybels)
  • Fix misreported setup Times in Verify messages #420 (@stakx)
  • Clean up build process #417 (@stakx)
  • Update Castle.Core from version 4.1.0 to 4.1.1 #416 (@stakx)
  • Improve method match accuracy in ExtractProxyCall #415 (@stakx)
  • IEnumerable mocks shouldn't cause NullReferenceException #413 (@stakx)
  • Prevent stack overflow in conditional setups #412 (@stakx)
  • Fix for the #409 #411 (@vladonemo)
  • Unskip 3 unit tests #404 (@stakx)
  • Move hardcoded message strings to Resources.resx #403 (@stakx)
  • Improve Setup / Verify exception messages for static members and extension methods #400 (@stakx)
  • Allow Mock<T>.Raise to raise events on child mocks #397 (@stakx)
  • Allow setting up null return values using Mock.Of #396 (@stakx)
  • Make abstract events defined in classes work even when CallBase is true #395 (@stakx)
  • Add NeutralResourcesLanguage to Assembly info for portable library use #394 (@benbillbob)
  • Make Interceptor more thread-safe #392 (@stakx)
  • Fix typo. #389 (@JohanLarsson)

v4.7.63 (2017-06-21)

Full Changelog

✨ Implemented enhancements:

  • Null array elements are not printed to test output #321

🐛 Fixed bugs:

  • Moq functionality broke after update to 4.7.1 #331
  • Possibly undocumented breaking change in 4.2.1408.0511 #315
  • Interface inheritance chains with read-only and read-write properties return defaults instead of mocked value. #275
  • Casting Mock To Interface Loses Value #175
  • Changes between versions 4.2.1402.2112 and 4.2.1409.1722 broken setup property #164
  • Mock<Class : IInterface>: Inconsistency between mocked-behavior and verification #157
  • Invocation on a non-virtual method when object casted to interface is wrong #156
  • Mock's members incorrectly marked as non-final #141
  • Changed behavior with explicit interface implementations #133

🔨 Other:

  • AddRangeAsync xunit .net core error #327
  • bug(assembly-loading): creating a moq of an interface in a third-party assembly can sometimes throw a FileNotFoundException #299
  • Setups using struct with nullable member overwrite previous setups #263
  • Quickstart should include SetupSequence #165
  • Latest version breaks interface mocks when property overridden in derived interface #162
  • SetupAllProperties with DefaultValue.Mock throws on concrete property type without parameterless constructor #149
  • Moq 1409 changes the behaviour of internals in a mocked class #132
  • Raise doesnt work when the event handler signature has one parameter #127

🔀 Merged:

  • Fix mocking of non-virtual methods via interface #387 (@stakx)
  • Ensure that null never matches It.IsRegex #385 (@stakx)

v4.7.58 (2017-06-20)

Full Changelog

✨ Implemented enhancements:

  • Trying to mock a multidimensional array fails #311
  • Missing .ThrowsAsync() extension for Task-returning methods #294
  • Parameter Array modifier lost in mock #235

🐛 Fixed bugs:

  • Mock.Of<T> fails with exception 'Unhandled Exception: System.ArgumentException: Interface not found' #340
  • Issue with setting up mock Objects, i.e. calling Mock<T>.Setup, when arguments have the same hashcodes #328

🔨 Other:

  • Exception after upgrade of Catle.Core to 4.1.0 #377
  • Upgrade to Castle.Core 4.1.0 #375
  • Extracting Func<T, bool> when using It.Is<T> can result in missing method setups #374
  • Interface inheritance introduced a possible breaking change in 4.2.1408.619 #371
  • SetUpAllProperties does not provide stubbing behavior for virtual properties. #283
  • IsAssignableFrom breaks __ComObject support #269
  • Compared with null after type conversion using 'as' keyword #237
  • Setups with Nullable types on strict mocks no longer match null #184
  • Wrong equality check in Interceptor.ExpressionKey #135
  • System.InvalidCastException when invoking method that starts with "add" #82

🔀 Merged:

  • Fix mocking of redeclared interface methods #382 (@stakx)
  • Fix "class method vs. interface method" bug introduced by 162a543 #381 (@stakx)
  • Fix formatting inconsistencies for array values in MockException.Message #380 (@stakx)

v4.7.49 (2017-06-18)

Full Changelog

🔀 Merged:

  • Fix Moq.nuspec and package references #379 (@stakx)

v4.7.46 (2017-06-18)

Full Changelog

🔨 Other:

  • Clean up the mess of mixed tabs & spaces in code files #364
  • Copyright notices still point to outdated Google Code project site #356
  • new Mock<T> can generate not unique names #348
  • Does moq have dependency on moq.resources? #344
  • Protected<T>.Setup fails on specific overloads #341
  • Moq cannot mock a method that contains a default value of null w/out explicitly setting that value in the mock's expression tree #316
  • Nuget Package Moq 4.5.28 could not be installed on MonoAndroid=v7.0 #308
  • A verify method that returns a boolean. #287
  • Invalid type for a default value exception (regression) #286
  • Verify passes on strict mock for parameter without proper setup. #285
  • Missing release tags #247
  • Mock any instance #214
  • Misleading exception when type parameter of mocked class is internal #192
  • MOQ Test for Hardcoded values #172
  • Stack overflow when setting up mock with default value set to mock. #163
  • Stack overflow when setting up a property on a mock that references another instance of the same type #161
  • Quickstart has broken link to Microsoft Connect #159
  • Update wiki from MockFactory to MockRepository #153
  • Documentation #111
  • Mocks.Of in the quickstart #93
  • Can't setup protected methods with nullable parameters #92
  • Counting number of call method before callback raise #65
  • Allow setting up async methods easily #64
  • 4.1 does not support multi-threading #62
  • Add documentation to NuGet package and/or have updated easy to find online documentation #57
  • Deadlock in Interceptor #47
  • www.moqthis.com produces 404 #41
  • "Error binding to target method" #26

🔀 Merged:

  • Fix compilation warnings, clean up conditional compilation #378 (@stakx)
  • Make event accessor recognition logic more correct #376 (@stakx)
  • Ensure incorrect implementations of ISerializable are caught properly #370 (@stakx)
  • Update Castle Core from version 4.0.0 to 4.1.0 #369 (@stakx)
  • Renormalize indentation whitespace to tabs #368 (@stakx)
  • Fix equality check bug in ExpressionKey #363 (@stakx)
  • Replace old Google Code URL with GitHub URL #362 (@stakx)
  • Make It.IsAny, It.IsNotNull work for COM types #361 (@stakx)
  • Default values for multidimensional arrays #360 (@stakx)
  • Ensure default mock names are (more) unique #359 (@stakx)
  • Simplify logic in ExpressionMatcher.Matches #358 (@stakx)
  • Add ThrowsAsync overload for non-generic Task #357 (@stakx)

v4.7.25 (2017-06-02)

Full Changelog

🔨 Other:

  • Documentation Correction around using Verify() #332
  • Moq Docs #290
  • Link is Broken to Doc #108

🔀 Merged:

  • Fix failing AppVeyor build #352 (@stakx)
  • Migrate .NET Core projects to vs2017 #336 (@jeremymeng)
  • Added option to delay async returns and async throws #289 (@jochenz)

v4.7.12 (2017-05-30)

Full Changelog

🔨 Other:

  • Small grammar correction in documentation #260

🔀 Merged:

  • Added overload to enforce old behavior of exact parameter matching #347 (@80er)

v4.7.11 (2017-05-30)

Full Changelog

🔀 Merged:

  • Docs: Fix 4 typos (fixes #260) #349 (@stakx)

v4.7.10 (2017-05-06)

Full Changelog

🔨 Other:

  • Passing a mock into another mock does not work for me #174

v4.7.9 (2017-04-29)

Full Changelog

🔨 Other:

  • The dependency Moq >= 4.7.8 could not be resolved #339
  • Symbols for Moq 4.7.8 #338

v4.7.8 (2017-03-26)

Full Changelog

🔨 Other:

  • Protected Verify doesn't accept mocks of interfaces as valid for those interfaces #334

v4.7.7 (2017-03-25)

Full Changelog

🔀 Merged:

  • Fix bug in HasMatchingParameterTypes #335 (@jeremymeng)
  • Fixing documentation typo on Verifiable() usage. #333 (@jcockhren)
  • Fix for issue #92: Can't setup protected methods with nullable parameters #200 (@RobSiklos)

v4.7.1 (2017-02-28)

Full Changelog

🔀 Merged:

  • Fix typo in summary of Mock<T>.Setup docs #325 (@xavierdecoster)

v4.7.0 (2017-02-22)

Full Changelog

🔨 Other:

  • Identical setups are now not considered the same (regression) #295
  • moq breaks ASP.NET Core xUnit.net project for Core 1.0 Web API application #284
  • It.IsAny<decimal> throws "System.decimal is not a supported constant type" #265
  • Make Moq portable to .NET Core #168
  • Upgrade to Castle.Core 3.2.1 because of Mono #113

v4.6.62-alpha (2017-02-21)

Full Changelog

🔀 Merged:

  • Fix build errors after merging master to netcore #324 (@jeremymeng)

v4.6.39-alpha (2017-02-18)

Full Changelog

🔀 Merged:

  • Upgrade Castle.Core dependency to 4.0.0 #323 (@jeremymeng)

v4.5.30 (2017-01-09)

Full Changelog

🔀 Merged:

  • Fixing #295 and changing fix for #278 #313 (@MatKubicki)

v4.5.29 (2016-12-10)

Full Changelog

🔨 Other:

  • ReturnsAsync() with factory method does not behave as expected #303
  • Is it possible to mock local variable in a method #302
  • Mocking "FindBy" with Generic Repository C# .Net #301
  • Using It.IsAny<object>() with a lambda from dynamic fails when binding properties #298

🔀 Merged:

  • ReturnsAsync() lazy evaluation issue fix #303 #309 (@SaroTasciyan)

v4.5.28 (2016-11-10)

Full Changelog

🔀 Merged:

  • adds ReturnAsync extention method that accepts a Func<TResult> #297 (@joeenzminger)

v4.5.23 (2016-10-11)

Full Changelog

🔨 Other:

  • Setups for properties with multiple arguments override each other even with differing values #278

🔀 Merged:

  • Fixes an issue in comparing arguments of calls #291 (@MatKubicki)

v4.5.22 (2016-09-20)

Full Changelog

🔨 Other:

  • Add a .SetupThrowsDefault<T>() to configure a mock to throw w/o specifying a method #281
  • Events not working with CallBase = true depending on order interfaces are inherited. C : IA, IB behaves different than C : IB, IA #228

🔀 Merged:

  • Fix for issue #228: Events not raised on mocked type with multiple interfaces #288 (@bradreimer)

v4.6.38-alpha (2016-08-20)

Full Changelog

🔀 Merged:

  • Fix Castle.Core dependency version #282 (@jeremymeng)

v4.5.21 (2016-08-12)

Full Changelog

🔨 Other:

  • Unexpected behaviour with MockExtensions.Reset #220

🔀 Merged:

  • Moq Reset should clear all existing calls in the interceptor #277 (@anilkamath87)

v4.5.20 (2016-08-12)

Full Changelog

🔀 Merged:

  • Fixed InterceptObjectMethodsMixin to properly check for System.Object methods #280 (@kolomanschaft)

v4.5.19 (2016-08-10)

Full Changelog

🔀 Merged:

  • Fixing issues #161 and #163 #245 (@vladonemo)

v4.5.18 (2016-08-10)

Full Changelog

🔨 Other:

  • Somethings up with strict mock with recent changes #273
  • Allow setting up "overrides" for object members when mocking interfaces #248

🔀 Merged:

  • System.Object methods should always work. #279 (@kolomanschaft)

v4.6.36-alpha (2016-07-20)

Full Changelog

🔀 Merged:

  • Upgrade Castle.Core dependency to v4.0.0-beta1. #272 (@jeremymeng)

v4.5.16 (2016-07-18)

Full Changelog

🔨 Other:

  • Verifiable throw NullReferenceException for async Task methods #101

🔀 Merged:

  • Allow for class mocks and interface mocks to mock System.Object methods #250 (@kolomanschaft)

v4.5.13 (2016-07-11)

Full Changelog

🔨 Other:

  • Moq not verifying Expressions as expected #271

🔀 Merged:

  • Exceptions using Verify for specific calls should include actual values #264 (@hahn-kev)

v4.5.10 (2016-06-21)

Full Changelog

🔀 Merged:

  • Add an helper class to simplify parameter capture #251 (@ocoanet)

v4.5.9 (2016-06-09)

Full Changelog

🔨 Other:

  • Gitter badge points to non-existing room #268

v4.6.25-alpha (2016-06-06)

Full Changelog

🔨 Other:

  • Stop supporting Silverlight in next version? #257

🔀 Merged:

  • Add .NET Core Support #267 (@kzu)

v4.5.8 (2016-05-26)

Full Changelog

v4.5.7 (2016-05-26)

Full Changelog

v4.5.3 (2016-05-25)

Full Changelog

🔀 Merged:

  • VerityMocks and VerifyAllMocks Static Helper Methods #238 (@RehanSaeed)

v4.5.0 (2016-05-24)

Full Changelog

🔨 Other:

  • Method setup broken when specifying the same parameters in a different order in setup #252
  • NotImplementedException DynamicProxy2 error when CallBase = true while mocking interfaces #128
  • Swapped method arguments will overwrite previous method setup #50

v4.5.9-alpha (2016-05-22)

Full Changelog

🔨 Other:

  • Typo in condition #236

🔀 Merged:

  • Fixed setup issues when specifying the same parameters in a different order (issue #252) #262 (@LeonidLevin)

v4.5.7-alpha (2016-05-22)

Full Changelog

v4.5.6-alpha (2016-05-22)

Full Changelog

🔨 Other:

  • SetupSequence doesn't support ReturnsAsync #259
  • Nuget package with PCL is not available #253
  • TypeLoad Exception #241
  • Assert.Fail not available #234
  • Specify a mock return regardless of parameters passed into the method call #226
  • Does your project need more contributors/maintainers? #222
  • Why is building moq so difficult? #221
  • Cannot setup a callback on a protected method #217
  • Support for dnxcore5.0? #216
  • A COM type can't make its mock by same procedure as usual. #215
  • nonComVisibleBaseClass Error #213
  • Thread safety issue: race condition in MockDefaultValueProvider #205

🔀 Merged:

  • Adding exension methods ReturnsAsync and ThrowsAsync for ISetupSequentialResult #261 (@abatishchev)
  • Fix the out parameter issue of delegate mock #255 (@urasandesu)
  • Fix typo #242 (@AppChecker)
  • Fix for issue #205 (Thread safety issue: race condition in MockDefaultValueProvider) #207 (@mizbrodin)

v4.2.1510.2205 (2015-10-22)

Full Changelog

🔨 Other:

  • All Clarius Consulting links broken in README.md #210
  • How to ascertain an application is running in 3 tier mode. #209
  • Upgrade to Castle.Core 3.3.3 to get correct exception messages #203
  • Revision mismatch in nuspec file #201
  • how to use Moq for ViewModel unit testing #197
  • Mocking Abstract Class; Implements Interface; Generic Method Fails #193
  • Mocking extension methods #189

🔀 Merged:

  • upgrading to Castle.Core 3.3.3 #204 (@MSK61)
  • Saturday morning cartoon version of "conjunction" #202 (@breyed)
  • License is BSD-3, not BSD-2 #198 (@chkpnt)
  • Make TPL code Silverlight 5 compatible #148 (@iskiselev)

v4.2.1507.118 (2015-06-29)

Full Changelog

🔨 Other:

  • Callback not beeing called in current version 4.2.1506.2016 #183

v4.2.1506.2515 (2015-06-25)

Full Changelog

🔀 Merged:

  • Issue 184: allow null to match nullable value types #185 (@pkpjpm)
  • Added MockExtensions.Reset() to clear mock state (expectations+invocations) #138 (@ashmind)

v4.2.1506.2016 (2015-06-20)

Full Changelog

🔨 Other:

  • Invalid setup on non-virtual member, but the member is virtual #182
  • When throwing a MockException under Strict mode it would be beneficial to indicate any generic parameters used #176
  • NullReferenceException when mocked method has a nullable value type argument, but It.IsAny constraint is not nullable #90
  • Allow to use CallBase instead of Returns #20

🔀 Merged:

  • Dev > Master #180 (@kzu)
  • Add generic parameter type informat to exception text. #177 (@hasaki)
  • Fix NullReferenceException when passing null to a nullable argument but trying to match it with a non-nullable IsAny. #160 (@benjamin-hodgson)

v4.2.1502.911 (2015-02-09)

Full Changelog

🔨 Other:

  • The second invocation of a method with a Dictionary argument overwrites the dictionary passed in the previous invocation. #146
  • Multiple return values of type task #144
  • Issue on Dispose when using a Mock and Strict behavior (After 4.2.1402.2112) #143
  • SetupAllProperties doesn't setup properties that don't have a setter #136
  • Issue on Dispose when using a Mock on WebClient and Strict behavior #129
  • Links to blog posts are broken in README.md #121
  • NullReferenceException thrown by Match<T> #115

🔀 Merged:

  • Fix: #128 NotImplementedException DynamicProxy2 error when CallBase = true #145 (@rjasica)
  • Issue 136 - SetupAllProperties doesn't setup properties that don't have a setter #137 (@NGloreous)

v4.2.1408.717 (2014-08-07)

Full Changelog

v4.2.1409.1722 (2014-08-07)

Full Changelog

🔨 Other:

  • Breaking Change #126

v4.2.1408.619 (2014-08-06)

Full Changelog

🔨 Other:

  • Error mocking Generic Repository #120
  • Missing ReturnsExtensions for Methods which returns Task #117
  • Windows Phone 8 version #106
  • Doesn't support .NET Core 4.5.1 (can't install) #100
  • Mocking Interfaces #98
  • Ordered call issue with invocations with same arguments in MockSequence #96

🔀 Merged:

  • Delegate currying refactorings #125 (@theoy)
  • Should only add public interfaces #123 (@scott-xu)
  • Add exiting implemented interfaces to ImplementedInterfaces #119 (@scott-xu)
  • Only mark a condition as evaluated successfully on the method call that ... #97 (@drieseng)
  • Basic code contracts for public facing API #95 (@alexsimply)

v4.2.1402.2112 (2014-02-21)

Full Changelog

🔨 Other:

  • Override previous setup #89
  • Mock class's method with multiple parameter only take last paramter #88
  • unable to mock in unittesting on windows app? #79
  • Problems with Task in 4.2 version #78
  • Allow naming of mocks #74
  • Can't Mock class inherited from DBContext #67
  • Bug using Mock.Of on objects with virtual properties. #14

🔀 Merged:

  • Make InterfaceProxy public #99 (@pimterry)
  • Fix Proxy -> Poxy typo in the Silverlight project #85 (@pimterry)
  • Fix mock naming code & tests in Silverlight #83 (@pimterry)
  • Issue #78 #80 (@MatKubicki)
  • Use default proxy generation options, rather than an explicitly empty one #77 (@pimterry)
  • Give mocks names #76 (@pimterry)

v4.2.1312.1622 (2013-12-16)

Full Changelog

🔀 Merged:

  • Fixing #62 - Multithreaded test not working #68 (@MatKubicki)

v4.2.1312.1621 (2013-12-16)

Full Changelog

🔀 Merged:

  • Fix error when returning Task of a reference type #73 (@alextercete)

v4.2.1312.1615 (2013-12-16)

Full Changelog

v4.2.1312.1416 (2013-12-14)

Full Changelog

🔀 Merged:

  • InSequence-Setups can now be used on the same mock instance. #72 (@halllo)

v4.2.1312.1323 (2013-12-13)

Full Changelog

🔀 Merged:

  • Make Async methods on IReturns more discoverable #71 (@jdom)

v4.2.1312 (2013-12-13)

Full Changelog

v4.2.1312.1319 (2013-12-13)

Full Changelog

🔨 Other:

  • Cannot use Mock<T>.Raise() on WPF Routed Events #61

🔀 Merged:

  • Make TPL code Silverlight compatible #70 (@alextercete)
  • Re-normalize repository #69 (@alextercete)
  • Avoid NullReferenceException with async methods #66 (@alextercete)
  • Add extension methods for IReturns to allow specifying return values exceptions on async methods in a synchronous way #60 (@danielcweber)

v4.1.1311.615 (2013-11-06)

Full Changelog

🔨 Other:

  • Mock.As appears to be broken in Moq 4.1.1308.2321 #54

🔀 Merged:

  • adding sequential capability to throws for testing retry logic in web se... #59 (@kellyselden)
  • Matcher should always work with the whole expression, including Convert #56 (@svick)

v4.1.1309.919 (2013-09-09)

Full Changelog

v4.1.1309.1617 (2013-09-09)

Full Changelog

v4.1.1309.801 (2013-09-08)

Full Changelog

🔀 Merged:

  • support for reset of the call counts on all members. #55 (@salfab)

v4.1.1308.2321 (2013-08-23)

Full Changelog

v4.1.1309.800 (2013-08-23)

Full Changelog

🔀 Merged:

  • Merge dev into master #52 (@kzu)
  • #326 #51 (@stoo101)
  • Remove leftover git markup and code erroneously included in bad merge. Fixes #43 #45 (@yonahw)
  • Added covariant IMock<out T> interface to Mock<T> #44 (@tkellogg)
  • Added It.IsAnyValue #40 (@Pjanssen)
  • Fix for issue 361 #39 (@bittailor)
  • Fixed collection modified exception thrown as result of more methods bei... #36 (@yonahw)
  • added overload to Verify to accept Times as a Method Group #34 (@ChrisMissal)
  • refactored Interceptor.Intercept to use a set of strategies. . #31 (@FelicePollano)
  • added gitignore #30 (@FelicePollano)
  • Fixed space/tab mismatch in solving Issue #249 #29 (@FelicePollano)
  • Feature request: It.IsIn(..), It.IsNotIn(...) #27 (@rdingwall)
  • Corrected Verify method behavior for generic methods calls #25 (@Suremaker)

v4.1.1308.2316 (2013-08-23)

Full Changelog

v4.1.1308.2120 (2013-08-21)

Full Changelog

🔨 Other:

  • Leftover git markup in Interceptor.cs #43
  • feature: differentiate crashes from verification errors #15

🔀 Merged:

  • ILMerge compatible .NET 4.5 #48 (@lukas-ais)
  • Fix using Mock.Of on objects having properties with private setters #19 (@yorah)
  • added some type parameters #18 (@quetzalcoatl)
  • differentiate verification error from mock crash #16 (@quetzalcoatl)
  • Fix issue #325 #13 (@IharBury)
  • Fix castle references in .csproj #11 (@yorah)
  • Add .gitignore file #10 (@yorah)
  • Fix Issue #328 #9 (@yorah)
  • CallBase() Solution fixes #8 (@srudin)
  • Solving issue 319: SetupSequentialContext with Throws #7 (@lukas-ais)
  • Capability of mocking delegates (event handlers) #4 (@quetzalcoatl)

v4.0.10827 (2010-08-19)

Full Changelog

* This Changelog was automatically generated by github_changelog_generator