1 package net.sourceforge.cruisecontrol.chart; 2 3 import java.io.File ; 4 import java.util.ArrayList ; 5 import java.util.HashMap ; 6 import java.util.List ; 7 import java.util.Map ; 8 9 import junit.framework.TestCase; 10 import net.sourceforge.cruisecontrol.BuildInfo; 11 import net.sourceforge.cruisecontrol.BuildInfoSummary; 12 13 16 17 public class TimeChartDataTest extends TestCase { 18 19 public void testProduceDatasetNoData() throws Exception { 20 TimeChartData data = new TimeChartData(); 21 Map map = new HashMap (); 22 23 List buildInfos = new ArrayList (); 24 BuildInfoSummary buildInfoSummary = new BuildInfoSummary(buildInfos); 25 map.put("buildInfo", buildInfoSummary); 26 data.produceDataset(map); 27 } 28 29 public void testProduceDatasetBuildsInSameMinute() throws Exception { 30 TimeChartData data = new TimeChartData(); 31 Map map = new HashMap (); 32 33 List buildInfos = new ArrayList (); 34 BuildInfo info = new BuildInfo(new File ("log20050708100401.xml")); 35 buildInfos.add(info); 36 info = new BuildInfo(new File ("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 |