Pass complex parameters to [Theory]
问题 Xunit has a nice feature: you can create one test with a Theory attribute and put data in InlineData attributes, and xUnit will generate many tests, and test them all. I want to have something like this, but the parameters to my method are not 'simple data' (like string , int , double ), but a list of my class: public static void WriteReportsToMemoryStream( IEnumerable<MyCustomClass> listReport, MemoryStream ms, StreamWriter writer) { ... } 回答1: There are many xxxxData attributes in XUnit.