コード例 #1
0
        public void PropertyFilterDescription_DefaultValues()
        {
            var gd = new PropertyFilterDescription();

            Assert.IsNull(gd.CustomName, "CustomName default value is wrong.");
            Assert.IsNull(gd.Condition, "Condition default value is wrong.");
            Assert.IsNull(gd.PropertyName, "PropertyName default value is wrong.");
        }
コード例 #2
0
        public void PropertyFilterDescription_PropertyChangedNotifications_PropertyName()
        {
            var gd = new PropertyFilterDescription()
            {
                PropertyName = string.Empty
            };

            gd.AssertPropertyChanged("Setting PropertyName", () => gd.PropertyName = "CustomProperty", "PropertyName", "DisplayName");
        }
コード例 #3
0
        public void PropertyFilterDescription_DisplayName_From_PropertyName_and_CustomName()
        {
            var gd = new PropertyFilterDescription()
            {
                CustomName = "CustomName", PropertyName = "PropertyName"
            };

            Assert.IsNotNull(gd.DisplayName);
            Assert.AreEqual("CustomName", gd.DisplayName);
        }
コード例 #4
0
        public void PropertyFilterDescription_DisplayName_CorrectOnCleanUp()
        {
            var gd = new PropertyFilterDescription()
            {
                CustomName = "CustomName", PropertyName = "PropertyName"
            };

            Assert.IsNotNull(gd.DisplayName);
            Assert.AreEqual("CustomName", gd.DisplayName);
            gd.CustomName = null;
            Assert.AreEqual("PropertyName", gd.DisplayName);
            gd.PropertyName = null;
            Assert.IsNull(null, gd.DisplayName);
        }