public void ChildCanBeRun() { var run = new RunProxy("text"); this.testee.Add(run); this.testee.Children.Should().Contain(run); }
public override void VisitRun(RunProxy run) { if (this.displayOptions.IncludeFormatting) { this.builder .AppendFormat( "<Run {0}>{1}</Run>", FormatAttributes( new NamedValue("Language", run.Format.Language.ToString(CultureInfo.InvariantCulture)), new NamedValue("StyleIdentifier", run.Format.StyleIdentifier), new NamedValue("StyleName", run.Format.StyleName), new NamedValue("Font", run.Format.Font), new NamedValue("Size", run.Format.Size.ToString(CultureInfo.InvariantCulture))), run.Text.Escape()) .AppendLine(); } else { this.builder.AppendFormat("<Run>{0}</Run>", run.Text.Escape()) .AppendLine(); } }
public RunProxyFacts() { this.testee = new RunProxy(Text); }
public void HasChildrenInAddedOrder() { var firstRun = new RunProxy("text"); var secondRun = new RunProxy("text"); this.testee.Add(firstRun); this.testee.Add(secondRun); this.testee.Children.Should().ContainInOrder(firstRun, secondRun); }