org.opengis.cite.ogcapiprocesses10.openapi3.TestPoint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ets-ogcapi-processes10 Show documentation
Show all versions of ets-ogcapi-processes10 Show documentation
Describe purpose of test suite.
package org.opengis.cite.ogcapiprocesses10.openapi3;
import java.util.Collections;
import java.util.Map;
import java.util.Objects;
import com.reprezen.kaizen.oasparser.model3.MediaType;
/**
* Encapsulates a Test Point with the UriTemplate and predefined replacements.
*
* @author Lyn Goltz
*/
public class TestPoint {
private final String serverUrl;
private final String path;
private Map predefinedTemplateReplacement;
private Map contentMediaTypes;
/**
* Instantiates a TestPoint with UriTemplate but without predefined replacements.
* @param serverUrl the serverUrl, never null
* @param path the path never, null
* @param contentMediaTypes the content media types for the GET operation with
* response "200", may be null
*/
public TestPoint(String serverUrl, String path, Map contentMediaTypes) {
this(serverUrl, path, Collections.emptyMap(), contentMediaTypes);
}
/**
* Instantiates a TestPoint with UriTemplate and predefined replacements.
* @param serverUrl the serverUrl, never null
* @param path the path, never null
* @param predefinedTemplateReplacement a list of predefined replacements never
* null
* @param contentMediaTypes the content media types for the GET operation with
* response "200", may be null
*/
public TestPoint(String serverUrl, String path, Map predefinedTemplateReplacement,
Map contentMediaTypes) {
this.serverUrl = serverUrl;
this.path = path;
this.predefinedTemplateReplacement = Collections.unmodifiableMap(predefinedTemplateReplacement);
this.contentMediaTypes = contentMediaTypes;
}
/**
*
* Getter for the field serverUrl
.
*
* @return the serverUrl never null
*/
public String getServerUrl() {
return serverUrl;
}
/**
*
* Getter for the field path
.
*
* @return the path never, null
*/
public String getPath() {
return path;
}
/**
*
* Getter for the field predefinedTemplateReplacement
.
*
* @return an unmodifiable mao with predefined replacements, may be empty but never
* null
*/
public Map getPredefinedTemplateReplacement() {
return predefinedTemplateReplacement;
}
/**
*
* Getter for the field contentMediaTypes
.
*
* @return the content media types for the GET operation with response "200", may be
* null
*/
public Map getContentMediaTypes() {
return contentMediaTypes;
}
/** {@inheritDoc} */
@Override
public String toString() {
return "Server URL: " + serverUrl + " , Path: " + path + ", Replacements: " + predefinedTemplateReplacement;
}
/** {@inheritDoc} */
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
TestPoint testPoint = (TestPoint) o;
return Objects.equals(serverUrl, testPoint.serverUrl)
&& Objects.equals(path, testPoint.predefinedTemplateReplacement)
&& Objects.equals(predefinedTemplateReplacement, testPoint.path)
&& Objects.equals(contentMediaTypes, testPoint.contentMediaTypes);
}
/** {@inheritDoc} */
@Override
public int hashCode() {
return Objects.hash(serverUrl, path, predefinedTemplateReplacement, contentMediaTypes);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy