Codacy patch
@@ -11,7 +11,7 @@ import static org.assertj.core.api.Assertions.*;
import static org.mockito.Mockito.*;
/**
- * Tests the class {@link SeverityPieChart}
+ * Tests the class {@link SeverityPieChart}.
* @author Matthias Herpers
*/
class SeverityPieChartTest {
@@ -24,6 +24,7 @@ class SeverityPieChartTest {
Report report = createReport(0, 0, 0, 0);
PieChartModel pieChartModel = severityPieChart.create(report);
List<PieData> data = pieChartModel.getData();
+
assertThat(data.get(0).getName()).isEqualTo("High"); // Without Severity.ERROR
assertThat(data.get(0).getValue()).isEqualTo(0);
assertThat(data.get(1).getName()).isEqualTo("Normal");
@@ -41,6 +42,7 @@ class SeverityPieChartTest {
Report report = createReport(0, 0, 0, 1);
PieChartModel pieChartModel = severityPieChart.create(report);
List<PieData> data = pieChartModel.getData();
+
assertThat(data.get(0).getName()).isEqualTo("Error"); // With Severity.ERROR
assertThat(data.get(0).getValue()).isEqualTo(1);
assertThat(data.get(1).getName()).isEqualTo("High");
@@ -60,6 +62,7 @@ class SeverityPieChartTest {
Report report = createReport(1, 1, 1, 1);
PieChartModel pieChartModel = severityPieChart.create(report);
List<PieData> data = pieChartModel.getData();
+
assertThat(data.get(0).getName()).isEqualTo("Error"); // With Severity.ERROR
assertThat(data.get(0).getValue()).isEqualTo(1);
assertThat(data.get(1).getName()).isEqualTo("High");
