title: Comparing two arrays in unit test throwing a AssertFailedException
body: <p>I'm writing an unit tests for ready code and I'm receiving an unexpected AssertFailedException trying to run one of the test. Here is he:</p>
  
  <pre><code>[TestMethod]
      public void TestPositionGetter()
      {
          testPlayer.Position = new int[] { 1, 3 };
          int[] expectedPosition = testPlayer.Position;
          Assert.AreEqual(expectedPosition, testPlayer.Position);
      }
  </code></pre>
  
  <p>And here is the Position property in the Player class that I'm trying to test:</p>
  
  <pre><code>public int[] Position
      {
          get
          {
              return new int[] { this.PositionX, this.PositionY };
          }
          set
          {
              this.PositionX = value[0];
              this.PositionY = value[1];
          }
      }
  </code></pre>
  
  <p>Debugging the test, in local variables window player.Position and expectedPosition are looking similar but the test is still failing. I'm afraid the problem is coming from references.</p>