.setVulnerabilityProbability(sqCategory.getVulnerability().name());
Map<String, String> sectionKeyToContent = getSectionKeyToContent(ruleDto);
- Optional.ofNullable(sectionKeyToContent.get(DEFAULT_KEY)).ifPresent(ruleBuilder::setVulnerabilityDescription);
+ Optional.ofNullable(sectionKeyToContent.get(DEFAULT_KEY)).ifPresent(ruleBuilder::setRiskDescription);
Optional.ofNullable(sectionKeyToContent.get(ROOT_CAUSE_SECTION_KEY)).ifPresent(ruleBuilder::setVulnerabilityDescription);
Optional.ofNullable(sectionKeyToContent.get(ASSESS_THE_PROBLEM_SECTION_KEY)).ifPresent(ruleBuilder::setRiskDescription);
Optional.ofNullable(sectionKeyToContent.get(HOW_TO_FIX_SECTION_KEY)).ifPresent(ruleBuilder::setFixRecommendations);
Hotspots.ShowWsResponse response = newRequest(hotspot)
.executeProtobuf(Hotspots.ShowWsResponse.class);
- assertThat(response.getRule().getVulnerabilityDescription()).isEqualTo(introductionSection.getContent());
- assertThat(response.getRule().getRiskDescription()).isEmpty();
+ assertThat(response.getRule().getRiskDescription()).isEqualTo(introductionSection.getContent());
+ assertThat(response.getRule().getVulnerabilityDescription()).isEmpty();
assertThat(response.getRule().getFixRecommendations()).isEmpty();
}