File tree 1 file changed +8
-1
lines changed
src/Adapter/MSTest.CoreAdapter/Execution
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,9 @@ public Attribute[] GetAllAttributes(bool inherit)
93
93
}
94
94
95
95
public TAttributeType [ ] GetAttributes < TAttributeType > ( bool inherit )
96
- where TAttributeType : Attribute => ReflectHelper . GetAttributes < TAttributeType > ( this . TestMethod , inherit ) ;
96
+ where TAttributeType : Attribute
97
+ => ReflectHelper . GetAttributes < TAttributeType > ( this . TestMethod , inherit )
98
+ ?? EmptyHolder < TAttributeType > . Array ;
97
99
98
100
/// <summary>
99
101
/// Execute test method. Capture failures, handle async and return result.
@@ -784,5 +786,10 @@ void executeAsyncAction()
784
786
return timeoutResult ;
785
787
}
786
788
}
789
+
790
+ private static class EmptyHolder < T >
791
+ {
792
+ internal static readonly T [ ] Array = new T [ 0 ] ;
793
+ }
787
794
}
788
795
}
You can’t perform that action at this time.
0 commit comments