public void GetAttributesForType_PropertyAttributes_IsNull() { // Arrange & Act var attributes = ModelAttributes.GetAttributesForType(typeof(BaseViewModel)); // Assert Assert.Null(attributes.PropertyAttributes); }
public void GetAttributesForType_IncludesMetadataAttributes() { // Arrange & Act var attributes = ModelAttributes.GetAttributesForType(typeof(BaseViewModel)); // Assert Assert.Single(attributes.Attributes.OfType <ClassValidator>()); Assert.Single(attributes.TypeAttributes.OfType <ClassValidator>()); }