Class SquitResult
-
- All Implemented Interfaces:
public final class SquitResultIntermediate data class for storing test results.
-
-
Field Summary
Fields Modifier and Type Field Description private final Longidprivate final Stringdifferenceprivate final SquitResponseInfoexpectedResponseInfoprivate final BooleanisIgnoredprivate final MediaTypemediaTypeprivate final StringalternativeNameprivate final BooleanisSuccessprivate final BooleanisErrorprivate final StringsimpleNameprivate final StringcombinedNameprivate final Stringdescriptionprivate final Pathpathprivate final PathfullPathprivate final SquitMetaInfometaInfoprivate final List<String>expectedLinesprivate final List<String>actualLines
-
Constructor Summary
Constructors Constructor Description SquitResult(Long id, String difference, SquitResponseInfo expectedResponseInfo, Boolean isIgnored, MediaType mediaType, String alternativeName, Path contextPath, Path suitePath, Path testDirectoryPath, Path squitBuildDirectoryPath)
-
Method Summary
Modifier and Type Method Description final LonggetId()A unique id to use for further processing. final StringgetDifference()The difference of the expected and actual responses. final SquitResponseInfogetExpectedResponseInfo()The response info object, which is expected in this test. final BooleanisIgnored()If this result is ignored. final MediaTypegetMediaType()The media type of the associated request and response. final StringgetAlternativeName()final BooleanisSuccess()Convenience property being true if the test was successful. final BooleanisError()Convenience property being true if this result is an error. final StringgetSimpleName()Convenience property with the name of this test. final StringgetCombinedName()Convenience property with the combined name of this test. final StringgetDescription()An optional description of the test. final PathgetPath()Convenience property with the path to the test without the actual test directory. final PathgetFullPath()Convenience property with the full path consisting of the path and the actual test directory. final SquitMetaInfogetMetaInfo()Additional information associated with this result. final List<String>getExpectedLines()List of lines of the expected response. final List<String>getActualLines()List of lines of the actual response. -
-
Constructor Detail
-
SquitResult
SquitResult(Long id, String difference, SquitResponseInfo expectedResponseInfo, Boolean isIgnored, MediaType mediaType, String alternativeName, Path contextPath, Path suitePath, Path testDirectoryPath, Path squitBuildDirectoryPath)
- Parameters:
contextPath- The path of the context the test has been run in.suitePath- The path of the suite the test has been run in.testDirectoryPath- The path of the directory, the test files are contained in.squitBuildDirectoryPath- The directory of Squit's build files.
-
-
Method Detail
-
getDifference
final String getDifference()
The difference of the expected and actual responses. If empty, the test was successful.
-
getExpectedResponseInfo
final SquitResponseInfo getExpectedResponseInfo()
The response info object, which is expected in this test.
-
getMediaType
final MediaType getMediaType()
The media type of the associated request and response.
-
getAlternativeName
final String getAlternativeName()
-
isError
final Boolean isError()
Convenience property being true if this result is an error. This differs from a failure as such an exception has been thrown.
-
getSimpleName
final String getSimpleName()
Convenience property with the name of this test.
The name is denoted by the filename of the directory it resides in and optionally by a title set in the corresponding test.conf file.
-
getCombinedName
final String getCombinedName()
Convenience property with the combined name of this test.
This is the simpleName with the alternativeName if present.
-
getDescription
final String getDescription()
An optional description of the test.
-
getPath
final Path getPath()
Convenience property with the path to the test without the actual test directory.
-
getFullPath
final Path getFullPath()
Convenience property with the full path consisting of the path and the actual test directory.
-
getMetaInfo
final SquitMetaInfo getMetaInfo()
Additional information associated with this result.
-
getExpectedLines
final List<String> getExpectedLines()
List of lines of the expected response.
-
getActualLines
final List<String> getActualLines()
List of lines of the actual response.
-
-
-
-