Esempio n. 1
0
        public void SetAttributeValue_WhenDecimalSpecified_SetsNumericAtttibuteOnly()
        {
            // Act
            classUnderTest.SetAttributeValue("testnumeric", 1m, "UserName");

            // Assert
            Assert.AreEqual(1, classUnderTest.CustomNumericAttributes.Count);
            Assert.AreEqual(0, classUnderTest.CustomSelectionAttributes.Count);
            Assert.AreEqual(0, classUnderTest.CustomDateTimeAttributes.Count);
            Assert.AreEqual(0, classUnderTest.CustomStringAttributes.Count);
            var numericAttribute = classUnderTest.CustomNumericAttributes.SingleOrDefault(a => a.Key == "testnumeric");

            Assert.IsNotNull(numericAttribute);
            Assert.AreEqual(1m, numericAttribute.Value);
        }
Esempio n. 2
0
 void IExtendable.SetAttributeValue <T>(string attributeKey, T attributeValue, string updatedByUser)
 {
     customAttributes.SetAttributeValue(attributeKey, attributeValue, updatedByUser);
 }
Esempio n. 3
0
 public void SetAttributeValue <T>(string attributeKey, T attributeValue, string updatedByUser)
 {
     customAttributes.SetAttributeValue(attributeKey, attributeValue, updatedByUser);
 }