All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.overops.report.service.model.QualityGateTestResults Maven / Gradle / Ivy

There is a newer version: 2.34.2
Show newest version
package com.overops.report.service.model;

import java.util.List;

/**
 * Quality Gate Test Results
 *
 * Describes the Quality Gate category and references all the events associated with it
 */
public class QualityGateTestResults {

    private TestType testType;
    private boolean passed = false;
    private String message = "";
    private long errorCount = 0;
    private List events = null;

    public QualityGateTestResults(TestType testType) {
        this.testType = testType;
    }

    public QualityGateTestResults(TestType testType, boolean passed, String message) {
        this.testType = testType;
        this.passed = passed;
        this.message = message;
    }

    //
    public boolean isPassed() {
        return passed;
    }

    public void setPassed(boolean passed) {
        this.passed = passed;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List getEvents() {
        return events;
    }

    public TestType getTestType() {
        return testType;
    }

    public void setTestType(TestType testType) {
        this.testType = testType;
    }
    //

    public void setEvents(List events) {
        this.events = events;
        errorCount = events != null ? events.size() : 0;
    }

    public long getErrorCount() {
        return errorCount;
    }

    public void setErrorCount(long errorCount) {
        if (this.events != null) {
            throw new IllegalStateException("Can not set error count when event list is not null.");
        }
        this.errorCount = errorCount;
    }


    /**
     * Test Type
     * 

* This enum is used during rendering time to help break out sections / types of quality gates */ public enum TestType { NEW_EVENTS_TEST("New", "new-gate"), RESURFACED_EVENTS_TEST("Resurfaced", "resurfaced-gate"), TOTAL_EVENTS_TEST("Total", "total-gate"), UNIQUE_EVENTS_TEST("Unique", "unique-gate"), CRITICAL_EVENTS_TEST("Critical", "critical-gate"), REGRESSION_EVENTS_TEST("Increasing", "increasing-gate"); private String displayName; private String anchor; TestType(String displayName, String anchor) { this.displayName = displayName; this.anchor = anchor; } // public String getDisplayName() { return this.displayName; } public String getAnchor() { return this.anchor; } // } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy