title: NullReferenceException when using NUnit
body: <p>I'm trying to set up unit tests for a card game application, but my code is throwing a NullReferenceException: Object reference not set to an instance of an object. As far as I can tell I should not be getting this error, but there it is. </p>
  
  <p>Here is my code:</p>
  
  <pre><code>        [TestFixture]
          public class Tests
          {
              CardTable aTable = null;
  
              [SetUp]
              public void setup()
              {
                  aTable = new CardTable();
              }
  
  
              [Test]
              public void setPlayerGold_setTo0_return0()
              {
                  //arrange
  
                  //act
                  aTable.setPlayerGold(0);
  
  
                  //assert
                  Assert.AreEqual(0, aTable.playerGold);
              }
         }
  
         public class CardTable
         {
             int playerGold;
  
             public CardTable()
             {
                 playerGold = 0;
             }
  
  
              public void setPlayerGold(int amount)
              {
                 if (amount == 0)
                 {
                      playerGold = 0;
                 }
                 else
                 {
                     playerGold += amount;
                 }
                 goldLabel.Text = playerGold + "";
              }
  </code></pre>
  
  <p>The exception gets thrown at the aTable.setup line as though aTable was not instantiated, even though it clearly was in the [Setup], and I can't figure out why.</p>
  
  <p>I am running Visual C# 2010 Express v10.0.40219.1 SP1Rel with NUnit 2.6.0.12051.</p>
  
  <p>Any help would be appreciated.
  Thanks!</p>