示例#1
0
        private void DefaultTestString(DependencyProperty property,
                                       object setValue,
                                       StringPropertyDelegate stringDelegate)
        {
            Assert.IsNotNull(property, "#0");

            TextBlock block = new TextBlock();

            block.SetValue(property, setValue);
            Assert.AreEqual(stringDelegate(block), block.GetValue(property), "#1");

            Assert.AreEqual(setValue, stringDelegate(block), "#2");
            Assert.AreEqual(setValue, block.GetValue(property), "#3");
        }
示例#2
0
		private void DefaultTestString (DependencyProperty property, 
		                                object setValue, 
						StringPropertyDelegate stringDelegate)
		{
			Assert.IsNotNull (property, "#0");

			TextBlock block = new TextBlock ();

			block.SetValue (property, setValue);
			Assert.AreEqual (stringDelegate (block), block.GetValue (property), "#1");

			Assert.AreEqual (setValue, stringDelegate (block), "#2");
			Assert.AreEqual (setValue, block.GetValue (property), "#3");
		}