Пример #1
0
        public void Does_return_on_FirstAttribute()
        {
            var o = new SingleAttr();

            Assert.That(o.GetType().FirstAttribute <NormalAttribute>().Name, Is.EqualTo("a"));
            Assert.That(o.GetType().FirstAttribute <BaseAttribute>().Name, Is.EqualTo("b"));

            Assert.That(o.GetType().FirstAttribute <INormalAttribute>().Name, Is.EqualTo("a"));
            Assert.That(o.GetType().FirstAttribute <IBaseAttribute>().Name, Is.EqualTo("b"));
        }
Пример #2
0
        public void Does_return_on_FirstAttribute()
        {
            var o = new SingleAttr();

            Assert.That(o.GetType().FirstAttribute<NormalAttribute>().Name, Is.EqualTo("a"));
            Assert.That(o.GetType().FirstAttribute<BaseAttribute>().Name, Is.EqualTo("b"));
            
            Assert.That(o.GetType().FirstAttribute<INormalAttribute>().Name, Is.EqualTo("a"));
            Assert.That(o.GetType().FirstAttribute<IBaseAttribute>().Name, Is.EqualTo("b"));
        }