Beispiel #1
0
    public void ConversionTest(int headerLevel)
    {
        HeaderConverter converter = GetHeaderConverter();

        var blockInput = new HeadingBlock(null);

        blockInput.Level  = headerLevel;
        blockInput.Inline = new ContainerInline();

        var result = (Header)converter.Execute(blockInput);

        Assert.Equal(result.Level, headerLevel);
    }
Beispiel #2
0
        /// <summary>
        ///     Get prepared IToStringConverter interface object
        /// </summary>
        /// <returns></returns>
        public static IToStringConverter GetStringConverter()
        {
            var timeParser = new TimeParser();

            var headerConverter = new HeaderConverter();

            var hourConverter   = GetHourConverter();
            var minuteConverter = GetMinuteConverter();

            var modelConverter = new ToModelConverter(timeParser, headerConverter, hourConverter, minuteConverter);
            var obj            = new ToStringConverter(modelConverter);

            return(obj);
        }