Exemple #1
0
        public void GetAttributeNamesOfSubclass()
        {
            var actual =
                FeatureAttributeAccessorHelper.GetFeatureAttributeNames(new TestFeatureSubClass()).ToList();

            Assert.AreEqual(new[] { "Other", "Name" }, actual);
        }
Exemple #2
0
        public void GetAttributeNamesOfType()
        {
            var actual = FeatureAttributeAccessorHelper.GetFeatureAttributeNames(typeof(TestFeature)).ToList();

            Assert.AreEqual(new[] { "Other", "Name" }, actual);

            var actualInstance = FeatureAttributeAccessorHelper.GetFeatureAttributeNames(new TestFeature()).ToList();

            Assert.AreEqual(new[] { "Other", "Name" }, actualInstance);
        }
Exemple #3
0
        public void GetAllAttributes()
        {
            var testFeature = new TestFeature
            {
                Attributes = new DictionaryFeatureAttributeCollection {
                    { "attrib", "blah" }
                }
            };

            var allAttributes = FeatureAttributeAccessorHelper.GetFeatureAttributeNames(testFeature);

            Assert.AreEqual(new[] { "attrib", "Other", "Name" }, allAttributes);
        }