etDescription("An exception is expected");
    }
  }
}
</div>

<p>This example uses the fluent interface supported by <b>TestCaseData</b>
to make the program more readable. The last yield statement above  is equivalent to

<div class="code"><pre class="prettyprint">
      TestCaseData data = new TestCaseData(0,0);
      data.ExpectedException = typeof(DivideByZeroException;
      data.TestName = "DivideByZero";
      data.Description = "An exception is expected";
      yield return data;
</pre>
</div>

<p><