-
Notifications
You must be signed in to change notification settings - Fork 291
Closed
Copy link
Labels
Area: MSTestIssues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)Issues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)
Description
Doc says:
/// Throws when multiple attributes are found (the attribute must allow multiple).
Implementation:
Attribute[] cachedAttributes = GetCustomAttributesCached(attributeProvider, inherit);
foreach (Attribute cachedAttribute in cachedAttributes)
{
if (cachedAttribute is TAttribute cachedAttributeAsTAttribute)
{
return cachedAttributeAsTAttribute;
}
}
return null;This method is called for the following attributes:
AsyncStateMachineAttribute- Already doesn't allow multiple. So it's okay.
TimeoutAttribute- Already doesn't allow multiple. So it's okay.
PriorityAttribute- Already doesn't allow multiple. So it's okay.
ClassInitializeAttribute- Already doesn't allow multiple. So it's okay.
ClassCleanupAttribute- Already doesn't allow multiple. So it's okay.
TestClassAttribute- We should throw if multiple are found. We cannot force it to not allow multiple because it's not sealed.
TestMethodAttribute- We should throw if multiple are found. We cannot force it to not allow multiple because it's not sealed.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area: MSTestIssues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)Issues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)