public void GetAttributeOnInstace_ParentDecoratedWithInheritableAttribute_NoInheritance_Null() { var inheritor = new ParentDecoratedWithCategoryAndDecription(); Assert.That(inheritor.GetAttribute <CategoryAttribute>(), Is.Null); Assert.That(inheritor.GetAttribute <CategoryAttribute>(false), Is.Null); }
public void GetAttributeOnInstace_ParentDecoratedWithInheritableAttribute_Inheritance_Instance() { var inheritor = new ParentDecoratedWithCategoryAndDecription(); Assert.That(inheritor.GetAttribute <CategoryAttribute>(true), Is.InstanceOf <CategoryAttribute>() .With.Property("Name").EqualTo("cat")); }
public void GetAttributesOnInstace_ParentDecoratedWithInheritableAttribute_Inheritance_Instance() { var inheritor = new ParentDecoratedWithCategoryAndDecription(); Assert.That(inheritor.GetAttributes <CategoryAttribute>(true), Has.Length.EqualTo(1).And .All.InstanceOf <CategoryAttribute>()); }
public void HasAttributeOnInstace_ParentNotDecoratedWithAttribute_False() { var inheritor = new ParentDecoratedWithCategoryAndDecription(); Assert.That(inheritor.HasAttribute <TestAttribute>(true), Is.False); }
public void HasAttributeOnInstace_ParentDecoratedWithNonInheritableAttribute_Inheritance_False() { var inheritor = new ParentDecoratedWithCategoryAndDecription(); Assert.That(inheritor.HasAttribute <DescriptionAttribute>(true), Is.False); }
public void GetAttributesOnInstace_ParentNotDecoratedWithAttribute_Empty() { var inheritor = new ParentDecoratedWithCategoryAndDecription(); Assert.That(inheritor.GetAttributes <TestAttribute>(true), Is.Empty); }
public void GetAttributesOnInstace_ParentDecoratedWithNonInheritableAttribute_Inheritance_Empty() { var inheritor = new ParentDecoratedWithCategoryAndDecription(); Assert.That(inheritor.GetAttributes <DescriptionAttribute>(true), Is.Empty); }