diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2019-05-14 09:40:27 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2019-05-14 20:21:11 +0200 |
commit | d25ecbed896aee26bf440de89f2ded1e6ee81c1e (patch) | |
tree | a6c9ffb1bc30e36a27735cf142a62f9388fc2320 /sonar-testing-harness | |
parent | 400a31228db020658b475ed3bc1b3fb2a09c14b1 (diff) | |
download | sonarqube-d25ecbed896aee26bf440de89f2ded1e6ee81c1e.tar.gz sonarqube-d25ecbed896aee26bf440de89f2ded1e6ee81c1e.zip |
Delete unused methods in org.sonar.test.html classes
Diffstat (limited to 'sonar-testing-harness')
4 files changed, 0 insertions, 78 deletions
diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/html/HtmlFragmentAssert.java b/sonar-testing-harness/src/main/java/org/sonar/test/html/HtmlFragmentAssert.java index 3054112afb5..636f8664e16 100644 --- a/sonar-testing-harness/src/main/java/org/sonar/test/html/HtmlFragmentAssert.java +++ b/sonar-testing-harness/src/main/java/org/sonar/test/html/HtmlFragmentAssert.java @@ -66,13 +66,4 @@ public class HtmlFragmentAssert extends AbstractAssert<HtmlFragmentAssert, Strin .withText(text); } - /** - * Convenience method. - * Sames as {@code hasParagraph().withLines(line1, line2, ...)}. - */ - public HtmlParagraphAssert hasParagraph(String firstLine, String... otherLines) { - return hasParagraph() - .withLines(firstLine, otherLines); - } - } diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/html/HtmlListAssert.java b/sonar-testing-harness/src/main/java/org/sonar/test/html/HtmlListAssert.java index 8f75fd56c22..6501d026cf1 100644 --- a/sonar-testing-harness/src/main/java/org/sonar/test/html/HtmlListAssert.java +++ b/sonar-testing-harness/src/main/java/org/sonar/test/html/HtmlListAssert.java @@ -66,19 +66,6 @@ public class HtmlListAssert extends HtmlBlockAssert<HtmlListAssert> { return this; } - public HtmlListAssert hasList() { - isNotNull(); - - Assertions.assertThat(nextBlocks.hasNext()) - .describedAs("no more block") - .isTrue(); - - Element element = nextBlocks.next(); - verifyIsList(element); - - return new HtmlListAssert(element, nextBlocks); - } - /** * Convenience method. * Sames as {@code hasParagraph().withText(text)}. @@ -118,22 +105,4 @@ public class HtmlListAssert extends HtmlBlockAssert<HtmlListAssert> { HtmlParagraphAssert.verifyIsParagraph(element); return element; } - - /** - * Verifies there is no more list in the block. - */ - public void noMoreBlock() { - isNotNull(); - - Assertions.assertThat(nextBlocks.hasNext()) - .describedAs("there are still some block. Next one:" + PRINT_FRAGMENT_TEMPLATE, - new Object() { - @Override - public String toString() { - return nextBlocks.next().toString(); - } - }) - .isFalse(); - } - } diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/html/HtmlParagraphAssert.java b/sonar-testing-harness/src/main/java/org/sonar/test/html/HtmlParagraphAssert.java index 2f073a7b7d3..cebc6d811d0 100644 --- a/sonar-testing-harness/src/main/java/org/sonar/test/html/HtmlParagraphAssert.java +++ b/sonar-testing-harness/src/main/java/org/sonar/test/html/HtmlParagraphAssert.java @@ -23,7 +23,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; -import java.util.Set; import java.util.stream.Stream; import org.assertj.core.api.Assertions; import org.jsoup.nodes.Element; @@ -90,15 +89,6 @@ public class HtmlParagraphAssert extends HtmlBlockAssert<HtmlParagraphAssert> { } /** - * Convenience method. - * Sames as {@code hasParagraph().withLines(line1, line2, ...)}. - */ - public HtmlParagraphAssert hasParagraph(String firstLine, String... otherLines) { - return hasParagraph() - .withLines(firstLine, otherLines); - } - - /** * Verifies there is no more block. */ public void noMoreBlock() { @@ -147,22 +137,6 @@ public class HtmlParagraphAssert extends HtmlBlockAssert<HtmlParagraphAssert> { return this; } - /** - * Verifies the current block has all and only the specified lines, in any order. - */ - public HtmlParagraphAssert withLines(Set<String> lines) { - isNotNull(); - - List<String> actualLines = toLines(actual); - String[] expectedLines = lines.toArray(new String[0]); - - Assertions.assertThat(actualLines) - .describedAs(PRINT_FRAGMENT_TEMPLATE, actual) - .containsOnly(expectedLines); - - return this; - } - private static List<String> toLines(Element parent) { Iterator<Node> iterator = parent.childNodes().iterator(); if (!iterator.hasNext()) { diff --git a/sonar-testing-harness/src/main/java/org/sonar/test/html/MimeMessageAssert.java b/sonar-testing-harness/src/main/java/org/sonar/test/html/MimeMessageAssert.java index 0ca6aaede72..8c288f326e0 100644 --- a/sonar-testing-harness/src/main/java/org/sonar/test/html/MimeMessageAssert.java +++ b/sonar-testing-harness/src/main/java/org/sonar/test/html/MimeMessageAssert.java @@ -71,18 +71,6 @@ public final class MimeMessageAssert extends AbstractAssert<MimeMessageAssert, M return this; } - public MimeMessageAssert hasSubject(String text) { - isNotNull(); - - try { - Assertions.assertThat(actual.getSubject()).isEqualTo(text); - } catch (MessagingException e) { - throw new IllegalStateException(e); - } - - return this; - } - public MimeMessageAssert subjectContains(String text) { isNotNull(); |