Thursday, April 9, 2015

xUnit.net: Extensions Config v2.0

Last year I open sourced some code that allowed you to power your xUnit theories from a custom section in your application configuration file. I have now updated that project to support xUnit 2.0, and also to allow for an optional name attribute to be set on each data set.

<testData>
  <tests>
    <add name="SampleProject.Class1.Main">
      <data>
        <add index="0" name="Optional" p0="Hello" p1="World" />
        <add index="1" name="Cows" p0="Goodnight" p1="Moon" />
      </data>
    </add>
  </tests>
</testData>

Enjoy,
Tom

No comments:

Post a Comment

Real Time Web Analytics