public void EmptyStringValuesConvertToNullIfTargetIsNullable() { var result = (int?)PrefixedAppSettingsReader.ConvertToType("", typeof(int?)); Assert.That(result == null); }
public void ValuesConvertToEnumMembers() { var result = (LogEventLevel)PrefixedAppSettingsReader.ConvertToType("Information", typeof(LogEventLevel)); Assert.AreEqual(LogEventLevel.Information, result); }
public void ConvertibleValuesConvertToTIfTargetIsNullable() { var result = (int?)PrefixedAppSettingsReader.ConvertToType("3", typeof(int?)); Assert.That(result == 3); }