Exemplo n.º 1
0
        public void DefaultValues(PropertyTestCase property)
        {
            var view     = property.CreateView();
            var expected = property.ExpectedDefaultValue;
            var actual   = property.PropertyGetter(view);

            Assert.AreEqual(property.ExpectedDefaultValue, property.PropertyGetter(view), property.DebugName);
        }
        public void Set(PropertyTestCase property)
        {
            var view = property.CreateView();

            bool changed = false;

            view.PropertyChanged += (sender, args) => {
                if (args.PropertyName == property.Name)
                {
                    changed = true;
                }
            };

            var testvalue = property.TestValue;

            property.PropertySetter(view, testvalue);

            Assert.True(changed, property.DebugName);
            Assert.AreEqual(testvalue, property.PropertyGetter(view), property.DebugName);
        }
		public void DoubleSet (PropertyTestCase property)
		{
			var view = property.CreateView ();

			var testvalue = property.TestValue;
			property.PropertySetter (view, testvalue);

			bool changed = false;
			view.PropertyChanged += (sender, args) => {
				if (args.PropertyName == property.Name)
					changed = true;
			};

			property.PropertySetter (view, testvalue);

			Assert.False (changed, property.DebugName);
			Assert.AreEqual (testvalue, property.PropertyGetter (view), property.DebugName);
		}
		public void DefaultValues (PropertyTestCase property)
		{
			var view = property.CreateView ();
			Assert.AreEqual (property.ExpectedDefaultValue, property.PropertyGetter (view), property.DebugName);
		}