Visual Studio 2013 Update 4 Changes to MSFakes Shim Object Object Behavior

We have a set of unit tests, some of which use MS Fakes. Prior to update 4, they worked successfully. After applying Update 4, the tests that create the instance of the flashed type throw a ShimNotImplemented exception. This is confirmed by the execution of the same code base on two different machines, one with update 4 without it.

I understand that it is possible to change the behavior of the customized type between DefaultValue and NotImplemented, but from what I can determine before Update 4, the default was DefaultValue. Naively, this seems to be a change. We will need to modify a series of tests to accommodate this.

A brief review of the MSDN article on Update 4 does not mention changes to MS Fakes.

By the way, we ran into this problem and amended our links. This was not mentioned again in the release documentation.

Can anyone confirm that the default behavior of the MS Fakes binder object has changed using VS Update 4, and if so, why has it changed?

thanks

Richard

+5
source share
1 answer

I had the same problems, surprised that I did not see anyone reporting this. I got an answer to a call to Microsoft.QualityTools.Testing.Fakes.Shims.ShimBehaviors.BehaveAsDefaultValue (); in a test setup.

+5
source

Source: https://habr.com/ru/post/1209548/


All Articles