aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2015-05-12 11:30:34 +0200
committerDavid Gageot <david@gageot.net>2015-05-12 14:33:41 +0200
commite51d4301e3744763b1c9e56acbc11cad467d4fda (patch)
tree0b1c0db9c0f8977398b9058367e4c5e90ace1531 /plugins
parent7d5701e0a327448484ccee968e12ae3d9162d407 (diff)
downloadsonarqube-e51d4301e3744763b1c9e56acbc11cad467d4fda.tar.gz
sonarqube-e51d4301e3744763b1c9e56acbc11cad467d4fda.zip
Remove duplication
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionBarChartTest.java9
1 files changed, 1 insertions, 8 deletions
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionBarChartTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionBarChartTest.java
index a0937082942..8e50f49ab24 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionBarChartTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/charts/DistributionBarChartTest.java
@@ -26,10 +26,10 @@ import java.awt.image.BufferedImage;
import java.io.IOException;
public class DistributionBarChartTest extends AbstractChartTest {
+ DistributionBarChart chart = new DistributionBarChart();
@Test
public void simpleSample() throws IOException {
- DistributionBarChart chart = new DistributionBarChart();
BufferedImage image = chart.generateImage(new ChartParameters("v=0%3D5%3B1%3D22%3B2%3D2"));
assertChartSizeGreaterThan(image, 1000);
saveChart(image, "DistributionBarChartTest/simpleSample.png");
@@ -37,7 +37,6 @@ public class DistributionBarChartTest extends AbstractChartTest {
@Test
public void addXSuffix() throws IOException {
- DistributionBarChart chart = new DistributionBarChart();
// should suffix x labels with +
BufferedImage image = chart.generateImage(new ChartParameters("v=0%3D5%3B1%3D22%3B2%3D2&xsuf=%2B"));
assertChartSizeGreaterThan(image, 1000);
@@ -46,7 +45,6 @@ public class DistributionBarChartTest extends AbstractChartTest {
@Test
public void addYSuffix() throws IOException {
- DistributionBarChart chart = new DistributionBarChart();
// should suffix y labels with %
BufferedImage image = chart.generateImage(new ChartParameters("v=0%3D5%3B1%3D22%3B2%3D2&ysuf=%25"));
assertChartSizeGreaterThan(image, 1000);
@@ -55,7 +53,6 @@ public class DistributionBarChartTest extends AbstractChartTest {
@Test
public void manySeries() throws IOException {
- DistributionBarChart chart = new DistributionBarChart();
BufferedImage image = chart.generateImage(new ChartParameters("v=0%3D5%3B1%3D22%3B2%3D2|0%3D7%3B1%3D15%3B2%3D4"));
assertChartSizeGreaterThan(image, 1000);
saveChart(image, "DistributionBarChartTest/manySeries.png");
@@ -63,7 +60,6 @@ public class DistributionBarChartTest extends AbstractChartTest {
@Test
public void manySeriesIncludingAnEmptySerie() throws IOException {
- DistributionBarChart chart = new DistributionBarChart();
// the third serie should not have the second default color, but the third one !
BufferedImage image = chart.generateImage(new ChartParameters("v=0%3D5%3B1%3D22%3B2%3D2||0%3D7%3B1%3D15%3B2%3D4"));
assertChartSizeGreaterThan(image, 1000);
@@ -72,7 +68,6 @@ public class DistributionBarChartTest extends AbstractChartTest {
@Test
public void overridenSize() throws IOException {
- DistributionBarChart chart = new DistributionBarChart();
BufferedImage image = chart.generateImage(new ChartParameters("v=0%3D5%3B1%3D22%3B2%3D2|0%3D7%3B1%3D15%3B2%3D4&w=500&h=200"));
assertChartSizeGreaterThan(image, 1000);
saveChart(image, "DistributionBarChartTest/overridenSize.png");
@@ -80,7 +75,6 @@ public class DistributionBarChartTest extends AbstractChartTest {
@Test
public void changeColor() throws IOException {
- DistributionBarChart chart = new DistributionBarChart();
BufferedImage image = chart.generateImage(new ChartParameters("v=0%3D5%3B1%3D22%3B2%3D2&c=777777&bgc=777777"));
assertChartSizeGreaterThan(image, 1000);
saveChart(image, "DistributionBarChartTest/changeColor.png");
@@ -88,7 +82,6 @@ public class DistributionBarChartTest extends AbstractChartTest {
@Test
public void smallSize() throws IOException {
- DistributionBarChart chart = new DistributionBarChart();
BufferedImage image = chart.generateImage(new ChartParameters("v=0%3D5%3B1%3D22%3B2%3D2%3B4%3D22%3B5%3D22%3B6%3D22&c=777777&w=120&h=80&fs=8"));
assertChartSizeGreaterThan(image, 500);
saveChart(image, "DistributionBarChartTest/smallSize.png");