If you decide to use them, I recommend using these rules:
Only generate the fakes you care about
UseDisable
, Clear
, and !
.<StubGeneration Disable="true"/> <ShimGeneration> <Clear/> <Add FullName="Foo.Bar!" />
Enable diagnostics:
<Fakes xmlns="http://schemas.microsoft.com/fakes/2011/" Diagnostic="true">
Treat Fakes warnings as errors
Sadly, there's no easy way to do this. Edit:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Fakes\Microsoft.QualityTools.Testing.Fakes.targets
Target
BuildFakesAssemblies
, the GenerateFakes
task sets the FakesMessages
property, which you always want to be blank, so add:<Error Condition="@(FakesMessages) != '' Text="Error generating fakes" />
No comments:
Post a Comment