示例#1
0
        public void GetAttributeDisplayNameNonExistentProperty()
        {
            var feature = new TestFeature();

            feature.Attributes        = new DictionaryFeatureAttributeCollection();
            feature.Attributes["Jan"] = 3;

            var displayName = FeatureAttributeAccessorHelper.GetAttributeDisplayName(feature, "Piet");
        }
示例#2
0
        public void GetAttributeDisplayName()
        {
            var displayName = FeatureAttributeAccessorHelper.GetAttributeDisplayName(typeof(TestFeature), "Other");

            Assert.AreEqual("Kees", displayName);

            var displayNameInstance = FeatureAttributeAccessorHelper.GetAttributeDisplayName(new TestFeature(), "Other");

            Assert.AreEqual("Kees", displayName);
        }
示例#3
0
        public void GetAttributeDisplayNameInAttributeCollection()
        {
            var feature = new TestFeature();

            feature.Attributes        = new DictionaryFeatureAttributeCollection();
            feature.Attributes["Jan"] = 3;

            var displayName = FeatureAttributeAccessorHelper.GetAttributeDisplayName(feature, "Jan");

            Assert.AreEqual("Jan", displayName);
        }
示例#4
0
 public void GetAttributeDisplayNameThrowExceptionForNonExistingProperties()
 {
     var displayName = FeatureAttributeAccessorHelper.GetAttributeDisplayName(typeof(TestFeature), "Blabla");
 }