Esempio n. 1
0
        public void StringFormattingIsApplied(string value, string format, string expected)
        {
            var formatter = new ThemedDisplayValueFormatter(DefaultThemes.None, null);
            var sw        = new StringWriter();

            formatter.FormatLiteralValue(new ScalarValue(value), sw, format);
            var actual = sw.ToString();

            Assert.Equal(expected, actual);
        }
Esempio n. 2
0
 public ThemedJsonValueFormatter(ConsoleTheme theme, IFormatProvider formatProvider)
     : base(theme)
 {
     _displayFormatter = new ThemedDisplayValueFormatter(theme, formatProvider);
     _formatProvider   = formatProvider;
 }