001package org.conqat.engine.sourcecode.coverage;
002
003import com.fasterxml.jackson.annotation.JsonCreator;
004import com.fasterxml.jackson.annotation.JsonProperty;
005
006/**
007 * {@link TestDetails} with additional information about which cluster of tests
008 * the test case belongs to during prioritization.
009 */
010public class ClusteredTestDetails extends TestDetails {
011
012        private static final long serialVersionUID = 1L;
013
014        /** The name of the JSON property name for {@link #clusterId}. */
015        private static final String CLUSTER_ID_PROPERTY = "clusterId";
016
017        /**
018         * A unique identifier for the cluster this test should be prioritized within.
019         * May not be null.
020         */
021        @JsonProperty(CLUSTER_ID_PROPERTY)
022        public final String clusterId;
023
024        @JsonCreator
025        public ClusteredTestDetails(@JsonProperty(UNIFORM_PATH_PROPERTY) String uniformPath,
026                        @JsonProperty(SOURCE_PATH_PROPERTY) String sourcePath, @JsonProperty(CONTENT_PROPERTY) String content,
027                        @JsonProperty(LAST_CHANGED_TIMESTAMP_PROPERTY) long lastChangedTimestamp,
028                        @JsonProperty(CLUSTER_ID_PROPERTY) String clusterId) {
029                super(uniformPath, sourcePath, content, lastChangedTimestamp);
030                this.clusterId = clusterId;
031        }
032}