Package org.evomaster.test.utils
Class EMTestUtils
java.lang.Object
org.evomaster.test.utils.EMTestUtils
Class containing utility functions that can be used in the
automatically generated tests
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisValidURIorEmpty(String uri) static StringresolveLocation(String locationHeader, String expectedTemplate)
-
Constructor Details
-
EMTestUtils
public EMTestUtils()
-
-
Method Details
-
resolveLocation
- Parameters:
locationHeader- a URI-reference, coming from a "location" header. See RFC 7231. Note: it can be a relative referenceexpectedTemplate- a full URI of the target resource, but with some path elements that might (or might not) be unresolved. IflocationHeaderis not empty, it will replace the beginning of this template.- Returns:
- a fully resolved URI for the target resource. If there are problems, just return the input locationHeader. If this latter is empty/null, then return the template
-
isValidURIorEmpty
- Parameters:
uri- a string representing a URI- Returns:
- whether the given input string is either empty or a valid URI
-