public void CanFetchPropertiesOnType() { var getter = new CustomGetter(); var custom = new PropertyDescriptor().AddBehaviors(getter); factory.GetAdapter(typeof(IPhoneWithFetch), dictionary, custom); Assert.AreEqual(2, getter.PropertiesFetched.Count); }
public void CanFetchProperties() { var getter = new CustomGetter(); var custom = new PropertyDescriptor().AddBehaviors(getter); factory.GetAdapter(typeof(IPhone), dictionary, custom); Assert.AreEqual(1, getter.PropertiesFetched.Count); Assert.AreEqual(1, getter.PropertiesFetched.Count); Assert.IsTrue(getter.PropertiesFetched.Contains("Number")); }
public void CanFetchProperties() { var getter = new CustomGetter(); var custom = new DictionaryDescriptor().AddGetter(getter); factory.GetAdapter(typeof(IPhone), dictionary, custom); Assert.AreEqual(1, getter.PropertiesFetched.Count); Assert.AreEqual(1, getter.PropertiesFetched.Count); Assert.IsTrue(getter.PropertiesFetched.Contains("Number")); }