Exemple #1
0
        public void Can_get_formatted_value_generic()
        {
            var entity = new xts_entity();

            entity.FormattedValues["xts_optionsetvalue"] = "formatted-value-4567";
            var accessor = new EntityAccessor <xts_entity>(entity);

            Assert.Equal("formatted-value-4567", accessor.GetFormattedValue(e => e.xts_optionsetvalue));
            Assert.Null(accessor.GetFormattedValue(e => e.xts_decimal));
        }
Exemple #2
0
        public void Can_get_formatted_value()
        {
            var entity = new xts_entity();

            entity.FormattedValues["xts_attribute"] = "formatted-value-1234";
            var accessor = new EntityAccessor <xts_entity>(entity);

            Assert.Equal("formatted-value-1234", accessor.GetFormattedValue("xts_attribute"));
            Assert.Null(entity.GetFormattedValue("xts_notexist"));
        }