Package net.sourceforge.cruisecontrol

Examples of net.sourceforge.cruisecontrol.BuildInfoSummary


    public void testProduceDatasetNoData() throws Exception {
        TimeChartData data = new TimeChartData();
        Map map = new HashMap();

        List buildInfos = new ArrayList();
        BuildInfoSummary buildInfoSummary = new BuildInfoSummary(buildInfos);
        map.put("buildInfo", buildInfoSummary);
        data.produceDataset(map);
    }
View Full Code Here


        List buildInfos = new ArrayList();
        BuildInfo info = new BuildInfo("log20050708100401.log");
        buildInfos.add(info);
        info = new BuildInfo("log20050708100431.log");
        buildInfos.add(info);
        BuildInfoSummary buildInfoSummary = new BuildInfoSummary(buildInfos);
        map.put("buildInfo", buildInfoSummary);
        data.produceDataset(map);
    }
View Full Code Here

    /** Verify that after the tag executes, an instance of BuildInfo is available and configured. */
    public void testTagCreatesBuildInfo() throws JspException {
        assertEquals(Tag.SKIP_BODY, tag.doStartTag());
        assertEquals(Tag.EVAL_PAGE, tag.doEndTag());
        BuildInfoSummary buildInfoSummary = (BuildInfoSummary) pageContext.getAttribute(BuildInfoTag.INFO_ATTRIBUTE);
        assertNotNull(buildInfoSummary);
        assertEquals(6, buildInfoSummary.size());
    }
View Full Code Here

    /*
     * @see javax.servlet.jsp.tagext.Tag#doEndTag()
     */
    public int doEndTag() throws JspException {
        File logDir = findLogDir();
        BuildInfoSummary buildInfoSummary = BuildInfo.loadFromDir(logDir);
        getPageContext().setAttribute(INFO_ATTRIBUTE, buildInfoSummary);
        return Tag.EVAL_PAGE;
    }
View Full Code Here

public class TimeChartData extends AbstractCruiseControlChartData implements ChartPostProcessor {
   
    private static final long serialVersionUID = -5159867264828131088L;

    public Object produceDataset(Map params) throws DatasetProduceException {
        BuildInfoSummary summary = (BuildInfoSummary) params.get("buildInfo");
        TimeSeries brokenSeries = new TimeSeries("Broken Builds", Minute.class);
        TimeSeries goodSeries = new TimeSeries("Good Builds", Minute.class);
        for (Iterator iter = summary.iterator(); iter.hasNext();) {
            BuildInfo buildInfo = (BuildInfo) iter.next();
            Date buildTime = buildInfo.getBuildDate();
            double timeValue = extractTimeOfDay(buildTime);
            Minute timePeriod = new Minute(buildTime);
            TimeSeries seriesToAddTo = buildInfo.isSuccessful() ? goodSeries
View Full Code Here

import de.laures.cewolf.DatasetProduceException;

public class PieChartData extends AbstractCruiseControlChartData {

    public Object produceDataset(Map params) throws DatasetProduceException {
        BuildInfoSummary summary = (BuildInfoSummary) params.get("buildInfo");
        DefaultPieDataset dataset = new DefaultPieDataset();
        dataset.setValue("Broken Builds", summary.getNumBrokenBuilds());
        dataset.setValue("Good Builds", summary.getNumSuccessfulBuilds());
        return dataset;
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.cruisecontrol.BuildInfoSummary

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.