title: Is this the right approach to TDD?
body: <p>New to TDD here. Just need some guidance on if I'm approaching this the right way. I'm looking to convert Roman numeral string to integer using TDD. I have 2 concerns (also, if anyone can point out other concerns, please do):</p>
  
  <ul>
  <li>It feels like I may be writing too many similar tests like
  I_returns_1, II_returns_2 etc.. Should I be combining some of these
  tests? Or to count to 20, should I really have 20 tests?</li>
  <li><p>Also have I refactored enough? Otherwise, any suggestions?</p>
  
  <pre><code>private static readonly Dictionary&lt;string, int&gt; Specials = new Dictionary&lt;string, int&gt;()
  {
      {"IV", 4},
      {"IX", 9}
  };
  
  public static int? Convert(string input)
  {
      if (input == null) return null;
  
      var processed = input;
      var counter = 0;
  
      foreach (var special in Specials)
      {
          if (!processed.Contains(special.Key)) continue;
  
          processed = processed.Replace(special.Key, "");
          counter = counter + special.Value;
      }
  
      for (int i = 0; i &lt; processed.Length; i++)
      {
          if (processed[i] == 'X')
              counter = counter + 10;
          if (processed[i] == 'V')
              counter = counter + 5;
          if (processed[i] == 'I')
              counter++;
      }
  
      return counter;
  }
  </code></pre></li>
  </ul>
  
  <p>And here are the tests which created above...</p>
  
  <pre><code>[TestClass]
  public class UnitTest1
  {
      [TestMethod]
      public void Check_Null_returns_Exception()
      {
          var result = Program.Convert(null);
  
          Assert.AreEqual(result,null);
      }
      [TestMethod]
      public void I_returns_1()
      {
          var result = Program.Convert("I");
  
          Assert.AreEqual(result, 1);
      }
      [TestMethod]
      public void II_returns_2()
      {
          var result = Program.Convert("II");
  
          Assert.AreEqual(result, 2);
      }
  
      [TestMethod]
      public void Multiple_I_returns_number()
      {
          var result = Program.Convert("III");
  
          Assert.AreEqual(result, 3);
      }
  
      [TestMethod]
      public void IV_returns_4()
      {
          var result = Program.Convert("IV");
  
          Assert.AreEqual(result, 4);
      }
  
      [TestMethod]
      public void V_returns_5()
      {
          var result = Program.Convert("V");
  
          Assert.AreEqual(result, 5);
      }
  
      [TestMethod]
      public void VI_returns_6()
      {
          var result = Program.Convert("VI");
  
          Assert.AreEqual(result, 6);
      }
      [TestMethod]
      public void VII_returns_7()
      {
          var result = Program.Convert("VII");
  
          Assert.AreEqual(7,result);
      }
      [TestMethod]
      public void VIII_returns_8()
      {
          var result = Program.Convert("VIII");
  
          Assert.AreEqual(8,result);
      }
      [TestMethod]
      public void IX_returns_9()
      {
          var result = Program.Convert("IX");
  
          Assert.AreEqual(9, result);
      }
  
      [TestMethod]
      public void X_returns_10()
      {
          var result = Program.Convert("X");
  
          Assert.AreEqual(10, result);
      }
  
      [TestMethod]
      public void Test_XI_to_XIII()
      {
          Assert.AreEqual(11, Program.Convert("XI"));
          Assert.AreEqual(12, Program.Convert("XII"));
          Assert.AreEqual(13, Program.Convert("XIII"));
      }
      [TestMethod]
      public void XIV_returns_14()
      {
          var result = Program.Convert("XIV");
  
          Assert.AreEqual(14, result);
      }
      [TestMethod]
      public void XV_returns_15()
      {
          var result = Program.Convert("XV");
  
          Assert.AreEqual(15, result);
      }
  
      [TestMethod]
      public void XVI_returns_16()
      {
          var result = Program.Convert("XVI");
  
          Assert.AreEqual(16, result);
      }
      [TestMethod]
      public void XVI_returns_17()
      {
          var result = Program.Convert("XVII");
  
          Assert.AreEqual(17, result);
      }
      [TestMethod]
      public void XVI_returns_18()
      {
          var result = Program.Convert("XVIII");
  
          Assert.AreEqual(18, result);
      }
  
      [TestMethod]
      public void XIX_returns_19()
      {
          var result = Program.Convert("XIX");
  
          Assert.AreEqual(19, result);
      }
      [TestMethod]
      public void XX_returns_20()
      {
          var result = Program.Convert("XX");
  
          Assert.AreEqual(20, result);
      }
  }
  </code></pre>