public void GetAttributeNamesOfSubclass() { var actual = FeatureAttributeAccessorHelper.GetFeatureAttributeNames(new TestFeatureSubClass()).ToList(); Assert.AreEqual(new[] { "Other", "Name" }, actual); }
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); }
public void GetAllAttributes() { var testFeature = new TestFeature { Attributes = new DictionaryFeatureAttributeCollection { { "attrib", "blah" } } }; var allAttributes = FeatureAttributeAccessorHelper.GetFeatureAttributeNames(testFeature); Assert.AreEqual(new[] { "attrib", "Other", "Name" }, allAttributes); }