Use AutoData and MemberData attributes in XUnit test
<p>I'm facing an interesting problem. I found out that the AutoDataAttribute can be use to minimize the "Arrange" part of your test (dependencies passed through the ctor). Awesome!</p>

<p>Example:</p>

<pre><code>public class AutoMoqDataAttribute : AutoDataAttribute
{
    public AutoMoqDataAttribute()
        : base(new Fixture().Customize(new AutoMoqCustomization()))
    { }
}

[Theory, AutoMoqData]
public void Process_ValidContext_CallsK2Workflows(
    [Frozen]Mock&lt;IK2Datasource&gt; k2,
    [Frozen]Mock&lt;IAppConfiguration&gt; config,
    PrBatchApproveBroker sut)
{
   (...)
}
</code></pre>

<p>Now i want to use this great feature <em>and</em> inject my own data into this theory:</p>

<pre><code>[Theory, AutoMoqData, MemberData("Data")]
public void ExtractPayments_EmptyInvoiceNumber_IgnoresRecordsWithEmptyInvoiceNumber(
        [Frozen]Mock&lt;IExcelDatasource&gt; xls,
        SunSystemExcelDatasource sut,
        List&lt;Row&gt; rows,
        int expectedCount)
{
    (...)
}
</code></pre>

<p>Problem: AutoData attribute will generate random data for me. The only way I found is to get rid of the AutoData attribute and use MemberData. If I do that, I need to handle object instantiations myself :)...</p>

<blockquote>
  <p>Is there a way to pass my classes <em>and</em> some "hard-coded" data at the same time?</p>
</blockquote>

<p>Thank u,
Seb</p>