Exemplo n.º 1
0
        public void GetAttributeNamesOfSubclass()
        {
            var actual =
                FeatureAttributeAccessorHelper.GetFeatureAttributeNames(new TestFeatureSubClass()).ToList();

            Assert.AreEqual(new[] { "Other", "Name" }, actual);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }