コード例 #1
0
        public void ODtextBox_ClearWavyLines_ExcessiveWhitespace()
        {
            ODtextBox textBox = GetTextBox();
            //Create text that matches exactly what a customer had that was causing problems (see task #1584694 for details).
            StringBuilder strBuilder = new StringBuilder(@"Pt is going to apply to Nursing school, also does wedding hair and makeup

119/66,77 bpm+-");

            //Add 13,259 newlines because reasons.
            for (int i = 0; i < 13259; i++)
            {
                strBuilder.Append("\r\n");
            }
            //Add the footer of the patient note that the customer had... true story.
            strBuilder.Append(@"Pt applying to Nuirsing school. 04/17 MC
BP-108/64
P-71  PS

");
            textBox.Text = strBuilder.ToString();
            //The following line took roughly 3 minutes to run when using the old way of clearing the wavy lines (hasAllLineHeights=true).
            //This unit test is simply here to make sure that the following line runs within a reasonable amount of time.
            //If it takes a long time to run we engineers will get frustrated with it and come investigate (or simply remove the test).
            textBox.ClearWavyLines();
            Assert.IsTrue(true);
        }