Beispiel #1
0
        public void ParagraphsAdd_AddsANewTextParagraphAtTheEndOfTheTextBoxAndReturnsAddedParagraph_WhenParagraphIsAddedAfterTextBoxContentChanged()
        {
            IPresentation        presentation = SCPresentation.Open(Properties.Resources._001, true);
            IAutoShape           autoShape    = (IAutoShape)presentation.Slides[0].Shapes.First(sp => sp.Id == 3);
            ITextBox             textBox      = autoShape.TextBox;
            IParagraphCollection paragraphs   = textBox.Paragraphs;
            IParagraph           paragraph    = textBox.Paragraphs.First();

            textBox.Text = "A new text";

            // Act
            IParagraph newParagraph = paragraphs.Add();

            // Assert
            newParagraph.Should().NotBeNull();
        }