public string ToString01([PexAssumeUnderTest] RTFBuilder target)
        {
            string result = target.ToString();

            return(result);
            // TODO: add assertions to method RTFBuilderTest.ToString01(RTFBuilder)
        }
        public RTFBuilder Constructor()
        {
            RTFBuilder target = new RTFBuilder();

            return(target);
            // TODO: add assertions to method RTFBuilderTest.Constructor()
        }
 public void ForeColorSet([PexAssumeUnderTest] RTFBuilder target, Color value)
 {
     target.ForeColor = value;
     // TODO: add assertions to method RTFBuilderTest.ForeColorSet(RTFBuilder, Color)
 }
 public void AppendLine([PexAssumeUnderTest] RTFBuilder target)
 {
     target.AppendLine();
     // TODO: add assertions to method RTFBuilderTest.AppendLine(RTFBuilder)
 }
 public void Append([PexAssumeUnderTest] RTFBuilder target, string value)
 {
     target.Append(value);
     // TODO: add assertions to method RTFBuilderTest.Append(RTFBuilder, String)
 }
        /// <summary>
        /// Fills the rich edit.
        /// </summary>
        /// <param name="rich">The rich.</param>
        /// <param name="value">The value.</param>
        public void FillRichEdit(System.Windows.Forms.RichTextBox rich, string value)
        {
            rich.Text = string.Empty;
            this.Line = value;

            RTFBuilder sb = new RTFBuilder {
                BackColor = rich.BackColor
            };

            while (this.TokenId != TokenKind.tkNull)
            {
                Color forecolor;
                switch (this.TokenId)
                {
                case TokenKind.tkKey:
                    forecolor = Color.Blue;
                    break;

                case TokenKind.tkFunction:
                    forecolor = Color.Fuchsia;
                    break;

                case TokenKind.tkGreyKeyword:
                    forecolor = Color.Gray;
                    break;

                case TokenKind.tkFuKeyword:
                    forecolor = Color.Fuchsia;
                    break;

                case TokenKind.tkDatatype:
                    forecolor = Color.Blue;
                    break;

                case TokenKind.tkNumber:
                    forecolor = Color.Red;
                    break;

                case TokenKind.tkString:
                    forecolor = Color.Red;
                    break;

                case TokenKind.tkComment:
                    forecolor = Color.DarkGreen;
                    break;

                default:
                    forecolor = Color.Black;
                    break;
                }

                sb.ForeColor = forecolor;
                if (this.Token == Environment.NewLine || this.Token == "\r" || this.Token == "\n")
                {
                    sb.AppendLine();
                }
                else
                {
                    sb.Append(this.Token);
                }

                this.Next();
            }

            rich.Rtf = sb.ToString();
        }