public void CanConvertDecimalAliasPropertyEditor(Core.Models.PublishedContent.PublishedPropertyType propertyType, object value, bool preview, double expected)
        {
            var converter = new DecimalValueConverter();
            var result    = converter.ConvertDataToSource(propertyType, value, preview);

            Assert.AreEqual(expected, result);
        }
Esempio n. 2
0
        public void CanConvertDecimalAliasPropertyEditor(object value, double expected)
        {
            var converter = new DecimalValueConverter();
            var inter     = converter.ConvertSourceToIntermediate(null, null, value, false);
            var result    = converter.ConvertIntermediateToObject(null, null, PropertyCacheLevel.Unknown, inter, false);

            Assert.AreEqual(expected, result);
        }