File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/Adapter/MSTest.CoreAdapter/Execution Expand file tree Collapse file tree 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)
9393 }
9494
9595 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 ;
9799
98100 /// <summary>
99101 /// Execute test method. Capture failures, handle async and return result.
@@ -784,5 +786,10 @@ void executeAsyncAction()
784786 return timeoutResult ;
785787 }
786788 }
789+
790+ private static class EmptyHolder < T >
791+ {
792+ internal static readonly T [ ] Array = new T [ 0 ] ;
793+ }
787794 }
788795}
You can’t perform that action at this time.
0 commit comments