Skip to content

Commit a835f17

Browse files
committed
[BAEL-2397] Text Blocks
Replaced by `p` by `span`
1 parent 41866bf commit a835f17

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

core-java-modules/core-java-14/src/main/java/com/baeldung/java14/textblocks/TextBlocks13.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public String getBlockOfHtml() {
66
<html>
77
88
<body>
9-
<p>example text</p>
9+
<span>example text</span>
1010
</body>
1111
</html>""";
1212
}

core-java-modules/core-java-14/src/test/java/com/baeldung/java14/textblocks/TextBlocks13UnitTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ void givenAnOldStyleMultilineString_whenComparing_thenEqualsTextBlock() {
1212
String expected = "<html>\n"
1313
+ "\n"
1414
+ " <body>\n"
15-
+ " <p>example text</p>\n"
15+
+ " <span>example text</span>\n"
1616
+ " </body>\n"
1717
+ "</html>";
1818
assertThat(subject.getBlockOfHtml()).isEqualTo(expected);
1919
}
2020

2121
@Test
2222
void givenAnOldStyleString_whenComparing_thenEqualsTextBlock() {
23-
String expected = "<html>\n\n <body>\n <p>example text</p>\n </body>\n</html>";
23+
String expected = "<html>\n\n <body>\n <span>example text</span>\n </body>\n</html>";
2424
assertThat(subject.getBlockOfHtml()).isEqualTo(expected);
2525
}
2626

0 commit comments

Comments
 (0)