Skip to content

Author Tests assume ICustomAttributeProvider.GetCustomAttributes return order is defined #1999

Closed
@oznetmaster

Description

@oznetmaster

After some research, it appears that the order of the attributes returned by ICustomAttributeProvider.GetCustomAttributes is undefined (random).

However, it seems like the assumption is made in Nunit that custom attributes are always returned in the order they appear in the source code.

For example, the AuthorAttribute allows multiple occurrences of the attribute. The tests for multiple AuthorAttribute assumes a specific order for the values in the resulting Author element in the test's Properties. That test can fail because the order is actually not defined.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions