public void CustomDateTimeTest() { var key = "Christmas"; // Pick any type to use as test type var date = new DateTime(2017, 12, 24); var value = date.ToString("dd/MM/yyyy"); // Setup dictionary value provider var settingsLoader = new SettingsLoader(new DictionaryValueProvider(new Dictionary <string, string> { { key, value } })); settingsLoader.AddTypeConverter <DateTime>(x => DateTime.Parse(x, System.Globalization.CultureInfo.GetCultureInfo("da-DK"))); var result = settingsLoader.Create <DateTime>(key); Assert.That(result, Is.Not.Null); Assert.That(result, Is.EqualTo(date)); }