title: How to mock web service call with Moq?
body: <p>The <code>using</code> below hits an external resource that I do not want to actually hit.  I want to test <code>someResult</code> and the code that uses it, but every time I run my unit test, this code still tries to hit the real web service.  How do I use moq to fake the real call to the web service, but not mock the rest of the code within the using?</p>
  
  <pre><code>public IMyInterface.SomeMethod()
  {    
       // hits a web service
       using ( mySoapClient client = new mySoapClient() )
       {
            var someResult = client.DoSomething();
         ...
         ...
       }
  }
  
  
  [TestMethod()]
  public void SomeMethodTest()
  {
      IMyInterface target = new MyInterface();
      target.SomeMethod();
  
      // Assert....
  }
  </code></pre>