public static void GetValueOrDefault_ReturnsNullableValue_IfDictionaryTValueIsNullable() { var dictionary = new Dictionary <string, string?>(); var value = dictionary.GetValueOrDefault("x"); CompilerAssert.Nullable(ref value); }
public static void GetValueOrDefault_ReturnsNullableValue_IfDictionaryTValueIsNotNullable_ForIReadOnlyDictionary() { var dictionary = (IReadOnlyDictionary <string, string>) new Dictionary <string, string>(); var value = dictionary.GetValueOrDefault("x"); CompilerAssert.Nullable(ref value); }
public static void NullIfEmpty_ReturnsNullable() { var value = "".NullIfEmpty(); CompilerAssert.Nullable(ref value); }