est]
[ExpectedException(typeof(InsufficientFundsException))]
public void TransferWithInsufficientFunds()
{
  Account source = new Account();
  source.Deposit(200m);

  Account destination = new Account();
  destination.Deposit(150m);

  source.TransferFunds(destination, 300m);
}</pre>
</div>

<p>This test method in addition to [Test] attribute has an [ExpectedException] attribute associated with it - this is the way to indicate that the test code is expecting an exception of a certain type; if such an excep