Table of Contents

Property Traits

Namespace
Xunit.v3
Assembly
xunit.v3.core.dll

Traits

Gets a set of traits for the associated data. The data is provided as an array of string values that are alternating keys and values (e.g., ["key1", "value1", "key2", "value2"]).

public string[]? Traits { get; set; }

Property Value

string[]

Remarks

This is structured as an array because attribute initializers don't support dictionaries. Note: Setting an odd number of values will throw away the unmatched key at the end of the list. If you seem to be missing your a key/value pair or have misaligned keys and values, make sure you have an even number of strings alternating between keys and values.