public void TestGetPropertyValue() { var keyValuePair = new KeyValuePair <string, object>("*key*", "*value*"); Assert.IsNull(ObjectExtensionMethods.GetPropertyValue(null, "any")); Assert.IsNull(keyValuePair.GetPropertyValue("NonExistant")); Assert.IsNull(new KeyValuePair <string, object>("*key*", null).GetPropertyValue("Value")); Assert.AreEqual("*key*", keyValuePair.GetPropertyValue("Key")); Assert.AreEqual("*value*", keyValuePair.GetPropertyValue("Value")); }