views:

118

answers:

2

Hi all,

I would like to test my custom fxrules.

I've seen this post : http://weblogs.asp.net/rosherove/archive/2007/02/24/writing-real-unit-tests-for-your-custom-fxcop-rules.aspx

but it's not working with the last version of fxcop. The Microsoft.Cci.Method.GetMethod doesn't exists and I can't find an alternative.

Do you know how to get a Microsoft.FxCop.Sdk.Method object ?

Thanks in advance for any help. Best regards,

+1  A: 

The removal of the reflection bridge from FxCop was announced quite some time ago. Also, use of an undocumented and unsupported API is not the only problem with the approach used in FxCopUnit, which does not implement screening for false positives. You may wish to consider switching to a testing approach that consumes the FxCop output report in order to screen for both missing violations and unexpected violations.

Nicole Calinoiu
ah, this is really annoyingthis will become harder to make unit tests
Tim
+1  A: 

Maybe you should be using Gendarme as it is open source and so it unlickly to have the same problems. (Why can't Microsoft get's it's head round test-driven-development?)

Ian Ringrose