|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase org.corpstein.image.TestChartFactory
public class TestChartFactory
Unit tests for the org.corpstein.image.ChartFactory class. As a side effect of exercising the ChartFactory features, this class provides pretty good code examples for creating various kinds of charts.
Constructor Summary | |
---|---|
TestChartFactory()
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
Added so that the test can be run directly |
protected void |
setUp()
Automatically called by JUnit before execution of each test case |
void |
testBar01()
Create a simple bar chart with 18 bars using default style and metrics. |
void |
testBar02()
Create a bar chart, replacing the default style with different colors, enabling the chart border, and adding an ImageLayer to place a logo under the first bar. |
void |
testBar03()
Create a bar chart with custom style and metrics, using a bar color association key and a TextLayer to add a source reference in the background of the chart image. |
void |
testBar04()
Create a bar chart with a gradient background, using diagonal bar labels and a transparent gif image defined by a URI to display a tornado graphic in the chart. |
void |
testBar05()
Create a bar chart with custom style, horizontal bar labels, a transparent PNG ImageLayer, and a TextLayer. |
void |
testBar06()
Create a bar chart with GradientPaint bar colors, a TextLayer, and a bar color association key (despite the relatively few bars). |
void |
testBar07()
Create a bar chart with custom style and using diagonal bar labels and a large JPEG ImageLayer. |
void |
testBar08()
Create a custom-styled chart that is intended to stress title and label width limits as well as the overall bar limit ChartStyle.MAX_BARS. |
void |
testCanReadFormat()
A unit test to verify ChartFactory.canReadFormat returns the correct value with several parameters |
void |
testCanWriteFormat()
A unit test to verify ChartFactory.canWriteFormat returns the correct value with several parameters |
void |
testLine01()
Create a simple line chart with custom colors and 2 series. |
void |
testLine02()
Create a line chart with 8 lines, a gradient background, and point marks enabled. |
void |
testLine03()
Create a line chart with 8 lines and custom-sized point marks. |
void |
testLine04()
Create a line chart with 5 lines, a gradient backdrop, and a TextLayer source reference in the corner of the image. |
void |
testLine05()
Create a line chart of sine waves with custom fonts and colors. |
void |
testLine06()
Create a line chart with partially transparent walls and a fancy, PNG ImageLayer that shows through the walls. |
void |
testMultiRow01()
Create a multi-row bar chart with 2 rows of data and custom bar Paint. |
void |
testMultiRow02()
Create a multirow bar chart with 3 rows of data, a transparent backdrop and a PNG ImageLayer showing through the transparency. |
void |
testMultiRow03()
Create a multirow bar chart with 3 rows of data and a fancy transparent PNG title ImageLayer. |
void |
testMultiRow04()
Create a multirow bar chart with 3 rows of data and a GradientPaint on the back row. |
void |
testMultiRow05()
Create a multirow bar chart with 3 rows of data, a custom ImageLayer, and transparent bars. |
void |
testMultiRow06()
Create a custom-styled, multirow bar chart with 3 rows of data and Unicode text for title and labels. |
void |
testMultiRow07()
Create a multirow bar chart with 4 rows of data. |
void |
testMultiRow08()
Create a multirow bar chart with 4 rows of data and a fancy transparent PNG title ImageLayer. |
void |
testMultiRow09()
Create a multirow bar chart with 2 rows of data, transparent bars with value labels, and a PNG watermark. |
void |
testPie01()
Create a simple pie chart with one dominant category and 3 smaller categories using two ImageLayers. |
void |
testPie02()
Create a pie chart with GradientPaints, 5 categories that are not sorted according to value and a TextLayer source reference. |
void |
testPie03()
Create a pie chart with 18 categories. |
void |
testPie04()
Create a pie chart with 30 categories and custom fonts. |
void |
testPie05()
Create a pie chart with a custom GradientPaint and some categories that are less than 2% of the total pie. |
void |
testPie06()
Create a pie chart with 30 sorted categories. |
void |
testPie07()
Create a pie chart with transparent slices and a watermark behind the pie. |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TestChartFactory()
Method Detail |
---|
protected void setUp()
setUp
in class junit.framework.TestCase
public void testCanReadFormat()
public void testCanWriteFormat()
public void testBar01()
public void testBar02()
public void testBar03()
public void testBar04()
public void testBar05()
public void testBar06()
public void testBar07()
public void testBar08()
public void testLine01()
public void testLine02()
public void testLine03()
public void testLine04()
public void testLine05()
public void testLine06()
public void testMultiRow01()
public void testMultiRow02()
public void testMultiRow03()
public void testMultiRow04()
public void testMultiRow05()
public void testMultiRow06()
public void testMultiRow07()
public void testMultiRow08()
public void testMultiRow09()
public void testPie01()
public void testPie02()
public void testPie03()
public void testPie04()
public void testPie05()
public void testPie06()
public void testPie07()
public static void main(java.lang.String[] args)
args
- Command-line arguments (none expected)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |