RESOURCES_SECTION_KEY);
public static final Map<String, String> HOTSPOT_SECTION_TITLES = Map.of(
- ROOT_CAUSE_SECTION_KEY, "What's the risk ?",
+ ROOT_CAUSE_SECTION_KEY, "What is the risk?",
ASSESS_THE_PROBLEM_SECTION_KEY, "Assess the risk",
- HOW_TO_FIX_SECTION_KEY, "How can you fix it ?"
+ HOW_TO_FIX_SECTION_KEY, "How can you fix it?"
);
public static final Map<String, String> RULE_SECTION_TITLES = Map.of(
- ROOT_CAUSE_SECTION_KEY, "Why is this an issue ?",
- HOW_TO_FIX_SECTION_KEY, "How to fix it ?",
+ ROOT_CAUSE_SECTION_KEY, "Why is this an issue?",
+ HOW_TO_FIX_SECTION_KEY, "How to fix it?",
RESOURCES_SECTION_KEY, "Resources"
);
String html = RuleDescriptionFormatter.getDescriptionAsHtml(rule);
assertThat(html)
.contains(
- "<h2>What's the risk ?</h2>"
+ "<h2>What is the risk?</h2>"
+ "<div>Root is Root</div><br/>"
+ "<h2>Assess the risk</h2>"
+ "<div>This is not a problem</div><br/>"
- + "<h2>How can you fix it ?</h2>"
+ + "<h2>How can you fix it?</h2>"
+ "<div>I don't want to fix</div><br/>"
);
}
Rule resultRule = result.getRule();
assertThat(resultRule.getHtmlDesc())
.contains(
- "<h2>What's the risk ?</h2>"
+ "<h2>What is the risk?</h2>"
+ "<div>Root is Root</div><br/>"
+ "<h2>Assess the risk</h2>"
+ "<div>This is not a problem</div><br/>"
- + "<h2>How can you fix it ?</h2>"
+ + "<h2>How can you fix it?</h2>"
+ "<div>I don't want to fix</div><br/>"
);
assertThat(resultRule.getMdDesc())
.contains(
- "<h2>What's the risk ?</h2>"
+ "<h2>What is the risk?</h2>"
+ "<div>Root is Root</div><br/>"
+ "<h2>Assess the risk</h2>"
+ "<div>This is not a problem</div><br/>"
- + "<h2>How can you fix it ?</h2>"
+ + "<h2>How can you fix it?</h2>"
+ "<div>I don't want to fix</div><br/>");
assertThat(resultRule.getDescriptionSectionsList())