Class EMTestUtils
- java.lang.Object
-
- org.evomaster.client.java.controller.api.EMTestUtils
-
public class EMTestUtils extends Object
Class containing utility functions that can be used in the automatically generated tests
-
-
Constructor Summary
Constructors Constructor Description EMTestUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isValidURIorEmpty(String uri)
static String
resolveLocation(String locationHeader, String expectedTemplate)
-
-
-
Method Detail
-
resolveLocation
public static String resolveLocation(String locationHeader, String expectedTemplate)
- 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. IflocationHeader
is 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
public static boolean isValidURIorEmpty(String uri)
- Parameters:
uri
- a string representing a URI- Returns:
- whether the given input string is either empty or a valid URI
-
-