title: How to pass mock object to another mock object constructor
body: <pre><code>    /// &lt;summary&gt;
      ///A test for ReverseName
      ///&lt;/summary&gt;
      [TestMethod()]
      public void ReverseNameTest()
      {
          Mock&lt;IEntityName&gt; entityName = new Mock&lt;IEntityName&gt;();
          entityName.SetupProperty(x =&gt; x.FirstName, "John");
          entityName.SetupProperty(x =&gt; x.LastName, "T.");
  
          var p = new Person(entityName.Object);
  
          string expected = "Your reverse name is T. John"; 
          string actual;
          actual = p.ReverseName();
          Assert.AreEqual(expected, actual);
      }
  }
  </code></pre>
  
  <p>//Person Class</p>
  
  <pre><code>  public Person(IEntityName EntityName)
      {
          this.EntityName = EntityName;
      }
  </code></pre>
  
  <p>Is it possible to mock Person class as well in the TestMehod or do I have to create an instance of Person as above?  </p>