Package hudson.plugins.analysis.core

Examples of hudson.plugins.analysis.core.AbstractHealthDescriptor


    /**
     * Tests whether we correctly compute the series if health reporting is enabled.
     */
    @Test
    public void testHealthySeriesCalculator() {
        AbstractHealthDescriptor healthDescriptor = createHealthBuilder(true, 0, true, 10, 30);

        CategoryBuildResultGraph builder = new HealthGraph(healthDescriptor);
        BuildResult result = mock(BuildResult.class);

        List<Integer> series;
View Full Code Here


    /**
     * Tests whether we don't get a healthy report if the reporting is disabled.
     */
    @Test
    public void testThresholdSeriesCalculator() {
        AbstractHealthDescriptor healthDescriptor = createHealthBuilder(true, 10, false, 20, 50);

        CategoryBuildResultGraph builder = new HealthGraph(healthDescriptor);
        BuildResult result = mock(BuildResult.class);

        List<Integer> series;
View Full Code Here

    /**
     * Tests Issue 796.
     */
    @Test
    public void testIssue796() {
        AbstractHealthDescriptor healthDescriptor = createHealthBuilder(false, 0, true, 1, 10);

        CategoryBuildResultGraph builder = new HealthGraph(healthDescriptor);
        BuildResult result = mock(BuildResult.class);

        List<Integer> series;
View Full Code Here

     *            than this value
     * @return the {@link HealthReportBuilder} under test
     */
    private AbstractHealthDescriptor createHealthBuilder(final boolean isThresholdEnabled, final int threshold,
            final boolean isHealthEnabled, final int healthy, final int unHealthy) {
        AbstractHealthDescriptor healthDescriptor = mock(AbstractHealthDescriptor.class);
        when(healthDescriptor.isThresholdEnabled()).thenReturn(isThresholdEnabled);
        when(healthDescriptor.getLowerBoundOfThresholds()).thenReturn(threshold);
        when(healthDescriptor.isHealthyReportEnabled()).thenReturn(isHealthEnabled);
        when(healthDescriptor.getHealthyAnnotations()).thenReturn(healthy);
        when(healthDescriptor.getUnHealthyAnnotations()).thenReturn(unHealthy);

        return healthDescriptor;
    }
View Full Code Here

TOP

Related Classes of hudson.plugins.analysis.core.AbstractHealthDescriptor

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.