public void TestItAllowsIterationOfAttributesInOrder() { var attrs = OrderAttribute.GetSortedProperties(typeof(HasSomeAttrs)); Assert.AreEqual("IntAttr", attrs.ElementAt(0).Name); Assert.AreEqual("StringAttr", attrs.ElementAt(1).Name); Assert.AreEqual("FloatAttr", attrs.ElementAt(2).Name); var thirdAttr = OrderAttribute.GetPropertyByOrder(typeof(HasSomeAttrs), 3); Assert.AreEqual("FloatAttr", thirdAttr.Name); }