org.conqat.engine.sourcecode.coverage.McDcCondition Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of teamscale-commons Show documentation
Show all versions of teamscale-commons Show documentation
Provides common DTOs for Teamscale
The newest version!
package org.conqat.engine.sourcecode.coverage;
import java.io.Serializable;
import org.conqat.lib.commons.test.IndexValueClass;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* An MC/DC condition necessary to meet the MC/DC criterion consisting of a textual description and
* the information whether it was fulfilled.
*/
@IndexValueClass(containedInBackup = true)
public class McDcCondition implements Serializable {
private static final long serialVersionUID = 1L;
@JsonProperty("description")
private final String description;
@JsonProperty("fulfilled")
private boolean fulfilled;
@JsonCreator
public McDcCondition(@JsonProperty("fulfilled") boolean fulfilled,
@JsonProperty("description") String description) {
this.fulfilled = fulfilled;
this.description = description;
}
/** @see #description */
public String getDescription() {
return description;
}
/** @see #fulfilled */
public boolean isFulfilled() {
return fulfilled;
}
/** @see #fulfilled */
public void setFulfilled(boolean fulfilled) {
this.fulfilled = fulfilled;
}
/** {@inheritDoc} */
@Override
public String toString() {
StringBuilder result = new StringBuilder();
if (fulfilled) {
result.append("+");
} else {
result.append("-");
}
result.append(" (" + description + ")");
return result.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy