public void ShouldBeAvailableToPropertiesAndNotInheritedAndAllowMultiple() { var attribute = new OptionAliasAttribute('a'); var customAttributes = attribute.GetType().GetCustomAttributes(false); var customAttributeUsage = customAttributes.OfType <AttributeUsageAttribute>().Single(); customAttributeUsage.ValidOn.Should().Be(AttributeTargets.Property); customAttributeUsage.AllowMultiple.Should().BeTrue(); }
public void ConstructorShouldSetNameProperly(char alias) { var attribute = new OptionAliasAttribute(alias); attribute.Alias.Should().Be(alias); }