Skip to content

JeevanJames/Xunit.DataAttributes

Repository files navigation

xUnit custom data attributes

Build status Test status codecov NuGet Version NuGet Downloads

Custom data attributes for xUnit, including attributes that provide various types of data from embedded resource and files.

Text content data attributes

Content data attributes provide various types of data from different text sources. Currently, two sources are supported - embedded resources in .NET assemblies and files.

Type of data Source: Assembly embedded resource Source: File on file system
Whole text content as the data. EmbeddedResourceContentAttribute FileContentAttribute
Lines from the text content as the data. EmbeddedResourceLinesAttribute FileLinesAttribute
Text content as JSON, where the whole content is deserialized to a .NET type. EmbeddedResourceAsJsonAttribute FileAsJsonAttribute
Text content as JSON, where JSON arrays are deconstructed and each item is a data item. EmbeddedResourceAsJsonDeconstructedAttribute FileAsJsonDeconstructedAttribute