diff --git a/TUnit.Core/Helpers/AttributeDictionaryHelper.cs b/TUnit.Core/Helpers/AttributeDictionaryHelper.cs index c0824199f9..e1eb73a940 100644 --- a/TUnit.Core/Helpers/AttributeDictionaryHelper.cs +++ b/TUnit.Core/Helpers/AttributeDictionaryHelper.cs @@ -27,12 +27,21 @@ public static IReadOnlyDictionary> ToAttributeDic var type = attr.GetType(); if (!result.TryGetValue(type, out var list)) { - var newList = new List { attr }; - result[type] = newList; + var newCollection = new [] { attr }; + result[type] = newCollection; } else { - ((List)list).Add(attr); + // first attribute is added to an array, move to a list for addtional values + if (list is Attribute[]) + { + var newlist = new List { list[0], attr }; + result[type] = newlist; + } + else + { + ((List)list).Add(attr); + } } }