Table of Contents

Class FullCoveredAttribute

Namespace
NDepend.Attributes
Assembly
NDepend.API.dll

This attribute can be used to declare that a code element is 100% covered by tests.

[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Constructor|AttributeTargets.Method)]
public sealed class FullCoveredAttribute : Attribute
Inheritance
FullCoveredAttribute
Inherited Members
Extension Methods

Remarks

The code metric ICodeContainer.PercentageCoverage can be used to determine whether a code element is 100% covered by tests or not.
Having types 100% covered by tests is a good idea because the small portion of code hard to cover, is also the portion of code that is the most likely to contain bugs.
Usage of this attributes is checked with the two default code rules:

  • Types tagged with FullCoveredAttribute should be 100% covered
  • Types 100% covered should be tagged with FullCoveredAttribute
If you don't want to link NDepend.API.dll, you can use your own FullCoveredAttribute and adapt the rules.

Constructor (1)

FullCoveredAttribute()

Create a new instance of the FullCoveredAttribute class.

public FullCoveredAttribute()

See Also