Is there a better way to write a unit test to ensure an object has been set with a newly instantiated value?
<p>say I have a class:</p>

<pre><code>public class Person
{
  public int Id { get; set; }
  public string Name { get; set; }
  public int Age { get; set; }
  public int Height { get; set; }
}
</code></pre>

<p>and in a method I instantiate it:</p>

<pre><code>public void SomeMethod(Person person)
{
   person = new Person()
}
</code></pre>

<p>so before the person was passed in it had values.</p>

<p>What is the best way to test SomeMethod set it to a newly instantiated value?</p>

<p>All I can think of is to check all the nullable properties are empty and the non nullable values have default values.</p>

<p>Is there a better way than this?</p>
