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); }
void IExtendable.SetAttributeValue <T>(string attributeKey, T attributeValue, string updatedByUser) { customAttributes.SetAttributeValue(attributeKey, attributeValue, updatedByUser); }
public void SetAttributeValue <T>(string attributeKey, T attributeValue, string updatedByUser) { customAttributes.SetAttributeValue(attributeKey, attributeValue, updatedByUser); }