File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,9 @@ public IReadOnlyCollection<TTestCase> OrderTestCases<TTestCase>(IReadOnlyCollect
5858
5959 private int PriorityForTest ( IXunitTestCase testCase , int defaultPriority )
6060 {
61- var priorityAttribute = testCase . TestMethod . Method . GetCustomAttribute < PriorityAttribute > ( true ) ;
61+ var priorityAttribute = testCase . TestMethod . Method
62+ . GetCustomAttributes < PriorityAttribute > ( )
63+ . SingleOrDefault ( ) ;
6264 return priorityAttribute ? . Priority ?? defaultPriority ;
6365 }
6466
@@ -67,7 +69,7 @@ private int DefaultPriorityForClass(IXunitTestCase testCase)
6769 var testClass = testCase . TestMethod . TestClass . Class ;
6870 if ( ! _defaultPriorities . TryGetValue ( testClass . Name , out var result ) )
6971 {
70- var defaultAttribute = testClass . GetCustomAttribute < PriorityAttribute > ( true ) ;
72+ var defaultAttribute = testClass . GetCustomAttributes < DefaultPriorityAttribute > ( ) . SingleOrDefault ( ) ;
7173 result = defaultAttribute ? . Priority ?? int . MaxValue ;
7274 _defaultPriorities [ testClass . Name ] = result ;
7375 }
You can’t perform that action at this time.
0 commit comments