Skip to content
This repository was archived by the owner on Nov 15, 2021. It is now read-only.
This repository was archived by the owner on Nov 15, 2021. It is now read-only.

NUnit TestCases are not recognized as Tracked Methods #303

@leemorris

Description

@leemorris

Recommend changing the GetTrackedMethod as follows:

public IEnumerable GetTrackedMethods(IEnumerable typeDefinitions)
{
return (from typeDefinition in typeDefinitions
from methodDefinition in typeDefinition.Methods
from customAttribute in methodDefinition.CustomAttributes
where customAttribute.AttributeType.FullName == "NUnit.Framework.TestAttribute"
|| customAttribute.AttributeType.FullName == "NUnit.Framework.TestCaseAttribute"
select new TrackedMethod()
{
MetadataToken = methodDefinition.MetadataToken.ToInt32(),
Name = methodDefinition.FullName,
Strategy = "NUnitTest"
}).Distinct();
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions