Esempio n. 1
0
        public void ValidateAndSetAttributeValue_WhenStringDoesNotExeedStringMaxLength_SetsValue()
        {
            // Arrange
            var stringCustomAttributeConfig = new CustomAttributeConfiguration
            {
                AttributeKey        = "StringWithMaxLength",
                CustomAttributeType = CustomAttributeType.String,
                StringMaxLength     = 500
            };

            // Act
            classUnderTest.ValidateAndSetAttributeValue(stringCustomAttributeConfig, "ValidString", "UserName");

            // Assert
            var customStringAttribute = classUnderTest.CustomStringAttributes.SingleOrDefault(a => a.Key == "StringWithMaxLength");

            Assert.IsNotNull(customStringAttribute);
            Assert.AreEqual("ValidString", customStringAttribute.Value);
        }
Esempio n. 2
0
 public void ValidateAndSetAttributeValue <T>(VPS.CustomAttributes.CustomAttributeConfiguration attributeConfig, T attributeValue, string updatedByUser)
 {
     customAttributes.ValidateAndSetAttributeValue(attributeConfig, attributeValue, updatedByUser);
 }
Esempio n. 3
0
 public void ValidateAndSetAttributeValue <T>(CustomAttributeDetail attributeDetail, T attributeValue, string updatedByUser)
 {
     customAttributes.ValidateAndSetAttributeValue(attributeDetail, attributeValue, updatedByUser);
 }