public static void MHorizontalRule_Constructor_AssignStyle() { HorizontalRuleStyle style = HorizontalRuleStyle(); var horizontalRule = new MHorizontalRule(style, HorizontalRuleCount(), HorizontalRuleSpace()); Assert.Equal(style, horizontalRule.Style); }
public HorizontalRuleFormat(HorizontalRuleStyle style, int count, string separator) { Error.ThrowOnInvalidHorizontalRuleCount(count); Error.ThrowOnInvalidHorizontalRuleSeparator(separator); Style = style; Count = count; Separator = separator; }
public static void MFactory_HorizontalRule_DefaultValues(HorizontalRuleStyle style) { for (int i = 3; i <= 5; i++) { Assert.Equal(style, MFactory.HorizontalRule(style, count: i).Style); Assert.Equal(i, MFactory.HorizontalRule(style, count: i).Count); Assert.Equal(" ", MFactory.HorizontalRule(style, count: i).Separator); } }
public static HorizontalRuleFormat Modify(this in HorizontalRuleFormat format) { HorizontalRuleStyle style = format.Style; do { style = HorizontalRuleStyle(); } while (style != format.Style); return(new HorizontalRuleFormat(style, format.Count.Modify(3, 10), format.Separator + " ")); }
public static void MFactory_HorizontalRule(HorizontalRuleStyle style) { for (int i = 3; i <= 5; i++) { Assert.Equal(style, MFactory.HorizontalRule(style, count: i, separator: " ").Style); Assert.Equal(i, MFactory.HorizontalRule(style, count: i, separator: " ").Count); Assert.Null(MFactory.HorizontalRule(style, count: i, separator: null).Separator); Assert.Equal("", MFactory.HorizontalRule(style, count: i, separator: "").Separator); Assert.Equal(" ", MFactory.HorizontalRule(style, count: i, separator: " ").Separator); } }
public static void MarkdownFormat_Constructor_HorizontalRule() { const HorizontalRuleStyle style = HorizontalRuleStyle.Hyphen; const int count = 3; const string space = " "; var horizontalRule = new HorizontalRuleFormat(style, count, space); var format = new MarkdownFormat(horizontalRuleFormat: horizontalRule); Assert.Equal(style, format.HorizontalRuleFormat.Style); Assert.Equal(count, format.HorizontalRuleFormat.Count); Assert.Equal(space, format.HorizontalRuleFormat.Separator); }
public MHorizontalRule(HorizontalRuleStyle style, int count, string separator) { Style = style; Count = count; Separator = separator; }
public HorizontalRuleFormat(HorizontalRuleStyle style, int count, string separator);
public abstract void WriteHorizontalRule(HorizontalRuleStyle style, int count = 3, string separator = " ");