Skip to content

Commit

Permalink
Fixes: #897 JavaDoc for setFont() augmented
Browse files Browse the repository at this point in the history
- describes that setFont() only affects new content, and don't change
  existing one
  • Loading branch information
asturio committed Mar 4, 2024
1 parent 00333c2 commit d64fa34
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions openpdf/src/test/java/com/lowagie/text/ParagraphTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.lowagie.text;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;

class ParagraphTest {

@Test
void testParagraphInParagraphAlign() {
// given
Paragraph outer = new Paragraph("Outer\n");
outer.setAlignment(Element.ALIGN_LEFT);
Paragraph inner = new Paragraph("Inner");
inner.setAlignment(Element.ALIGN_RIGHT);
// when
outer.add(inner);
// then
assertThat(outer.alignment).isEqualTo(Element.ALIGN_LEFT);
}

}

0 comments on commit d64fa34

Please sign in to comment.