コード例 #1
0
		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);
		}
コード例 #2
0
		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"));
		}
コード例 #3
0
		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"));
		}
コード例 #4
0
		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);
		}