public void Cannot_add_attributes_at_runtime_to_NormalAttribute() { TypeDescriptor.AddAttributes(typeof(RuntimeManyNormalAttr), new NormalAttribute("a3")); var o = new RuntimeManyNormalAttr(); Assert.That(o.GetType().AllAttributes <NormalAttribute>().Length, Is.EqualTo(1)); Assert.That(o.GetType().AllAttributes <INormalAttribute>().Length, Is.EqualTo(1)); }
public void Cannot_add_attributes_at_runtime_to_NormalAttribute() { typeof(RuntimeManyNormalAttr).AddAttributes(new NormalAttribute("a3")); var o = new RuntimeManyNormalAttr(); Assert.That(o.GetType().AllAttributes<NormalAttribute>().Length, Is.EqualTo(1)); Assert.That(o.GetType().AllAttributes<INormalAttribute>().Length, Is.EqualTo(1)); }