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

org.conqat.engine.sourcecode.coverage.testwise_coverage.TestParameter Maven / Gradle / Ivy

The newest version!
package org.conqat.engine.sourcecode.coverage.testwise_coverage;

import org.checkerframework.checker.nullness.qual.Nullable;
import org.conqat.lib.commons.string.StringUtils;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Represents a single parameter of a test execution as a parameter name and value pair.
 */
public class TestParameter {

	@JsonProperty("value")
	private String value;

	@JsonProperty("name")
	private String name;

	@JsonCreator
	public TestParameter(@JsonProperty("value") String value, @JsonProperty("name") @Nullable String name) {
		this.value = value;
		this.name = name;
	}

	@Override
	public String toString() {
		if (StringUtils.isEmpty(name)) {
			return value;
		}
		return name + "=" + value;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy