title: How to add moq to a working mstest unit test
body: <p>I am using MSTest to write unit tests, but I have been tasked with adding moq to the unit test.  I understand that if an integration test is done in which a file system, a database is normally called, that mocking is essentially allowing for the testing without actually making those "real" calls. I have looked around and just need some help.</p>
  
  <p>I was starting with some basic utilities that I found and started with some basic testing of them with Asserts.  However, I'm needing to take it to the next step and leverage MOQ. </p>
  
  <p>Here is a method that I am testing:</p>
  
  <pre><code>    public static bool IsStringEmptyOrNull(string strValue)
      {
          if(null != strValue)
          {
              strValue = strValue.Trim().ToLower();
              return (string.Empty == strValue || "undefined" == strValue);
          }
          return true;
      }
  </code></pre>
  
  <p>Then I have a Test that looks like this:</p>
  
  <pre><code>  using System;
    using System.Text;
    using System.Collections.Generic;
    using System.Linq;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Company.W.Utilities;
  
  
  namespace CESUtilities.Tests
  {
  [TestClass]
  public class When_string_is_empty_or_null
  {
      private string empty;
      private string isnull;
      private bool expected;
  
      [TestInitialize()]
      public void TestInitialize()
      {
          empty = "";
          isnull = null;
          expected = true;
      }
  
      [TestMethod]
      public void when_string_is_empty()
      {
  
          bool actual = Util.IsStringEmptyOrNull(empty);   
          Assert.AreEqual(expected, actual);
      }
  
      [TestMethod]
      public void when_string_is_null()
      {
          bool actual = Util.IsStringEmptyOrNull(isnull);
          Assert.AreEqual(expected, actual);
      }
  
  
  
      [TestCleanup()]
      public void TestCleanup()
      {
  
      }
  
  
    }
  }
  </code></pre>