public void BaseConverter_SourceTypeTests() { int defTestInt = 10; string defTestString = "Test string"; TestConverter conv1 = new TestConverter(); TestConverter conv2 = new TestConverter(defTestInt, defTestString); // test that the correct default value is returned when the source type is incorrect Assert.AreEqual(default(int), conv1.Convert(1, typeof(int), null, null), "Test converter Convert did not return the appropriate default value when given an incorrect source type"); Assert.AreEqual(defTestInt, conv2.Convert(1, typeof(int), null, null), "Test converter Convert did not return the appropriate default value when given an incorrect source type"); Assert.AreEqual(String.Empty, conv1.ConvertBack("1", typeof(string), null, null), "Test converter ConvertBack did not return the appropriate default value when given an incorrect source type"); Assert.AreEqual(defTestString, conv2.ConvertBack("1", typeof(string), null, null), "Test converter ConvertBack did not return the appropriate default value when given an incorrect source type"); }