title: Mocking with NSubstitute, needing some clarity.
body: <p>I am a bit confused about how to correctly mock an object. From what I have seen in the example on NSubstitute, this is the basic setup for an assert. My understanding is this is about testing the behavior of the method. My questions are as follows:</p>
  
  <ol>
  <li><p>Is this the correct way to mock getting a host name of a device. </p>
  
  <pre><code>[TestMethod]
  public void MockedDeviceHostName()
  {
      //Arrange 
      var device = Substitute.For&lt;IDeviceLogic&gt;();
      Device mockedDevice = new Device();     
  
      //Act   
      device.GetHostName("IP Address","Object Identifier Repository","CommunityString").Returns(mockedDevice.hostName);
  
      //Assert
      Assert.AreEqual(mockedDevice.hostName, device.GetHostName("IP Address", "Object Identifier Repository", "CommunityString"));
  
  }
  </code></pre></li>
  <li><p>What is the advantage of mocking. I of course understand this is behavior based testing, I mean in terms that I am setting the behavior expectations so I feel they will always be correct even if there is an error with the method, in this case. I am looking for a bit of clarity on mocking vs Unit Tests and integration tests.</p></li>
  </ol>