public void TrimTrailingSpaceTwiceWithTwoSpacesAtEnd() { CheckDisposed(); // create an StTxtPara using (StTxtParaBldr bldr = new StTxtParaBldr(Cache)) { IParaStylePropsProxy proxy = new DummyProxy("Whatever"); bldr.ParaStylePropsProxy = proxy; ITsTextProps textProps = StyleUtils.CharStyleTextProps(null, m_wsArbitrary); bldr.AppendRun("My run ", textProps); Assert.AreEqual(8, bldr.Length); // trim the space off the end bldr.TrimTrailingSpaceInPara(); Assert.AreEqual(7, bldr.Length); bldr.TrimTrailingSpaceInPara(); Assert.AreEqual(6, bldr.Length); StTxtPara para = bldr.CreateParagraph(m_text.Hvo, 1); // verify paragraph contents AssertEx.RunIsCorrect(para.Contents.UnderlyingTsString, 0, "My run", null, m_wsArbitrary); } // Dispose() frees ICU resources. }