I'm trying to start using Pex, and I have certain code that I want it to ignore testing.
I create configuration sections for config files using the Configuration Section Designer addin. Unfortunately the code generated is not quite perfect, because it doesn't do tests for nulls and other nice checks. However, for now at least I want the code to be ignored when running pex explorations as I can't change the code without it being overwritten in future, and it's a known fault that we can work around.
I found the PexInstrumentMarkedBy
and the PexCoverageFilterMarkedBy
attributes, which seem like they may do the job (of ignoring code with the GeneratedCodeAttribute), but as far as I cam see I would need to put those in my assembly, and thus have a reference to the Pex framework in my operational assembly... not going to happen.
Does anyone have better ideas?