示例#1
0
        public void ConvertedDPToInt_ConverterOnDPClass()
        {
            bool created = false;
            var  source  = new ConvertedObjectDPClassConverter {
            };
            var target   = new IntDPNoConverter {
                IntDP = 5
            };

            HookedConverter.ConstructorFunc = () => created = true;
            BindingOperations.SetBinding(target, IntDPNoConverter.IntDPProperty, new Binding("ConvertedObject")
            {
                Source = source
            });
            Assert.IsFalse(created, "#1");
        }
示例#2
0
        public void IntToConvertedDP_ConverterOnDPClass()
        {
            // Ignore type converters on the destination DPs declaring type.
            bool created = false;
            var  source  = new IntPropNoConverter {
                IntProperty = 5
            };
            var target = new ConvertedObjectDPClassConverter {
            };

            HookedConverter.ConstructorFunc = () => created = true;
            BindingOperations.SetBinding(target, ConvertedObjectDPClassConverter.ConvertedObjectProperty, new Binding("IntProperty")
            {
                Source = source
            });
            Assert.IsFalse(created, "#1");
        }
示例#3
0
		public void ConvertedDPToInt_ConverterOnDPClass()
		{
			bool created = false;
			var source = new ConvertedObjectDPClassConverter { };
			var target = new IntDPNoConverter { IntDP = 5 };

			HookedConverter.ConstructorFunc = () => created = true;
			BindingOperations.SetBinding(target, IntDPNoConverter.IntDPProperty, new Binding("ConvertedObject") { Source = source });
			Assert.IsFalse (created, "#1");
		}
示例#4
0
		public void IntToConvertedDP_ConverterOnDPClass()
		{
			// Ignore type converters on the destination DPs declaring type.
			bool created = false;
			var source = new IntPropNoConverter { IntProperty = 5 };
			var target = new ConvertedObjectDPClassConverter { };

			HookedConverter.ConstructorFunc = () => created = true;
			BindingOperations.SetBinding(target, ConvertedObjectDPClassConverter.ConvertedObjectProperty, new Binding("IntProperty") { Source = source });
			Assert.IsFalse (created, "#1");
		}