Top "Microsoft-fakes" questions

Microsoft Fakes is an isolation framework for creating delegate-based test stubs and shims in .NET Framework applications.

Shims warning messages

I am having small application in which I used SHIMS. So as you know it gives warning like "Warning 20 Some …

c# visual-studio-2012 microsoft-fakes
vs 2012: Shims compile

I am trying to make a shim in VS 2012 ultimate as it described in MSDN site: [TestClass] public class TestClass1 { […

visual-studio-2012 shim microsoft-fakes
How do I get shims for base classes using Microsoft Fakes?

class Parent{ public string Name{ get; set; } } class Child :Parent{ public string address{ get; set; } } [TestClass] class TestClass{ [TestMethod] public …

c# microsoft-fakes
Microsoft.Fakes won't run in normal unit test contexts

I'm using a simple proof-of-concept Fakes nUnit test: [Test] public void TestFakes() { using (var ctx = ShimsContext.Create()) { System.Fakes.ShimDateTime.…

c# visual-studio microsoft-fakes
how to stub HttpControllerContext

I am trying to unit-test a piece of code that gets called from a WebAPI (OData) controller and takes in …

c# asp.net-web-api stub microsoft-fakes
Fakes assembly is not generating

I can't figure out what I need to do to generate Fakes. In my test project I included a reference …

visual-studio-2013 microsoft-fakes
Microsoft Fakes shim for generic method

I'm failing to grok how to set up a shim for specific generic method. Here's the signature for the actual …

c# generics microsoft-fakes
Suppressing Microsoft Fakes warnings

I'm using Microsoft Fakes to shim a couple WindowsAzure components for testing. Following the advice in vs 2012: Shims compile, I …

visual-studio-2013 microsoft-fakes
How to Isolate (detour) constructor of class with Microsoft Fakes Shim?

Is there a possibility to isolate / replace an constructor of a class with Microsoft Fakes? In found an example for …

c# unit-testing microsoft-fakes
Fake Assemblies show warnings when generating shims for Interface and stubs for sealed types

I have a build configured with CI post which some tests are run. Although the tests run successfully, the build …

c# unit-testing structuremap microsoft-fakes irepository