.NET developers have used the [ExcludeFromCodeCoverage] attribute to focus validation on their business logic’s code coverage.
However, when building Xamarin.Forms applications, the [ExcludeFromCodeCoverage] attribute is not supported within the Portable Class Library.
To workaround this issue, use the [DebuggerNonUserCode] attribute instead. Be aware that the debugger will be disabled for the code associated to this attribute. As a result, to use the debugger, one must comment out or remove the “DebuggerNonUserCode” attribute.
NOTE:
Scott Nimrod is fascinated with Software Craftsmanship.
He loves responding to feedback and encourages people to share his articles.
He can be reached at scott.nimrod @ bizmonger.net