KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > cruisecontrol > chart > TimeChartDataTest


1 package net.sourceforge.cruisecontrol.chart;
2
3 import java.io.File JavaDoc;
4 import java.util.ArrayList JavaDoc;
5 import java.util.HashMap JavaDoc;
6 import java.util.List JavaDoc;
7 import java.util.Map JavaDoc;
8
9 import junit.framework.TestCase;
10 import net.sourceforge.cruisecontrol.BuildInfo;
11 import net.sourceforge.cruisecontrol.BuildInfoSummary;
12
13 /**
14  * @author Jeffrey Fredrick
15  */

16
17 public class TimeChartDataTest extends TestCase {
18
19     public void testProduceDatasetNoData() throws Exception JavaDoc {
20         TimeChartData data = new TimeChartData();
21         Map JavaDoc map = new HashMap JavaDoc();
22
23         List JavaDoc buildInfos = new ArrayList JavaDoc();
24         BuildInfoSummary buildInfoSummary = new BuildInfoSummary(buildInfos);
25         map.put("buildInfo", buildInfoSummary);
26         data.produceDataset(map);
27     }
28
29     public void testProduceDatasetBuildsInSameMinute() throws Exception JavaDoc {
30         TimeChartData data = new TimeChartData();
31         Map JavaDoc map = new HashMap JavaDoc();
32
33         List JavaDoc buildInfos = new ArrayList JavaDoc();
34         BuildInfo info = new BuildInfo(new File JavaDoc("log20050708100401.xml"));
35         buildInfos.add(info);
36         info = new BuildInfo(new File JavaDoc("log20050708100431.xml"));
37         buildInfos.add(info);
38         BuildInfoSummary buildInfoSummary = new BuildInfoSummary(buildInfos);
39         map.put("buildInfo", buildInfoSummary);
40         data.produceDataset(map);
41     }
42 }
43
Popular Tags