Merge branch '5.3.x'

This commit is contained in:
Brian Clozel
2021-11-16 15:05:24 +01:00
2 changed files with 7 additions and 7 deletions

View File

@@ -28,7 +28,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class HtmlUtilsTests {
@Test
public void testHtmlEscape() {
void testHtmlEscape() {
String unescaped = "\"This is a quote'";
String escaped = HtmlUtils.htmlEscape(unescaped);
assertThat(escaped).isEqualTo(""This is a quote'");
@@ -39,14 +39,14 @@ public class HtmlUtilsTests {
}
@Test
public void testHtmlUnescape() {
void testHtmlUnescape() {
String escaped = ""This is a quote'";
String unescaped = HtmlUtils.htmlUnescape(escaped);
assertThat(unescaped).isEqualTo("\"This is a quote'");
}
@Test
public void testEncodeIntoHtmlCharacterSet() {
void testEncodeIntoHtmlCharacterSet() {
assertThat(HtmlUtils.htmlEscape("")).as("An empty string should be converted to an empty string").isEqualTo("");
assertThat(HtmlUtils.htmlEscape("A sentence containing no special characters.")).as("A string containing no special characters should not be affected").isEqualTo("A sentence containing no special characters.");
@@ -62,7 +62,7 @@ public class HtmlUtilsTests {
// SPR-9293
@Test
public void testEncodeIntoHtmlCharacterSetFromUtf8() {
void testEncodeIntoHtmlCharacterSetFromUtf8() {
String utf8 = ("UTF-8");
assertThat(HtmlUtils.htmlEscape("", utf8)).as("An empty string should be converted to an empty string").isEqualTo("");
assertThat(HtmlUtils.htmlEscape("A sentence containing no special characters.")).as("A string containing no special characters should not be affected").isEqualTo("A sentence containing no special characters.");
@@ -74,7 +74,7 @@ public class HtmlUtilsTests {
}
@Test
public void testDecodeFromHtmlCharacterSet() {
void testDecodeFromHtmlCharacterSet() {
assertThat(HtmlUtils.htmlUnescape("")).as("An empty string should be converted to an empty string").isEqualTo("");
assertThat(HtmlUtils.htmlUnescape("This is a sentence containing no special characters.")).as("A string containing no special characters should not be affected").isEqualTo("This is a sentence containing no special characters.");