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 Stringdescriptionprivate final Pathpathprivate final PathfullPathprivate final SquitMetaInfometaInfo
-
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 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 StringexpectedContent()Returns List of lines of the expected response. final StringactualContent()Returns List of lines of the actual response. final StringactualInfoContent()Returns List of lines of the actual info 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.
-
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.
-
expectedContent
final String expectedContent()
Returns List of lines of the expected response.
-
actualContent
final String actualContent()
Returns List of lines of the actual response.
-
actualInfoContent
final String actualInfoContent()
Returns List of lines of the actual info response.
-
-
-
-