Package gov.niem.tools.api.validation
Class Test
java.lang.Object
gov.niem.tools.api.validation.Test
Information about a validation test.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Kinds of test severity (error, warning, info).static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
float
Test runtime in seconds. -
Constructor Summary
ConstructorsConstructorDescriptionTest()
Test
(TestResult.Status status, String id, String description, Test.Severity severity, String category, String component, String field, String comments, String scope, String source, String specId, String specUrl, String ruleNumber, String ruleUrl, String exampleValid, String exampleInvalid, String exceptions, String exceptionLabels, String notes, boolean ran, float runtime, long start, List<TestResult> results) Creates a newTest
instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic Test.TestBuilder
builder()
protected boolean
long
long
long
long
void
endTest()
Marks the test as ran and calculates the runtime.boolean
getField()
getId()
getNotes()
float
Test runtime in seconds.getScope()
long
getStart()
int
hashCode()
boolean
isRan()
void
setCategory
(String category) void
setComments
(String comments) void
setComponent
(String component) void
setDescription
(String description) void
setExampleInvalid
(String exampleInvalid) void
setExampleValid
(String exampleValid) void
setExceptionLabels
(String exceptionLabels) void
setExceptions
(String exceptions) void
void
void
void
setRan
(boolean ran) void
setResults
(List<TestResult> results) void
setRuleNumber
(String ruleNumber) void
setRuleUrl
(String ruleUrl) void
setRuntime
(float runtime) Test runtime in seconds.void
void
setSeverity
(Test.Severity severity) void
void
void
setSpecUrl
(String specUrl) void
setStart
(long start) void
setStatus
(TestResult.Status status) void
Starts the test and stores the current time for the test runtime calculation.void
startTest
(Test.Severity severity) Starts the test and stores the current time for the test runtime calculation.toString()
-
Field Details
-
status
-
id
-
description
-
severity
-
category
-
component
-
field
-
comments
-
scope
-
source
-
specId
-
specUrl
-
ruleNumber
-
ruleUrl
-
exampleValid
-
exampleInvalid
-
exceptions
-
exceptionLabels
-
notes
-
ran
public boolean ran -
runtime
public float runtimeTest runtime in seconds. -
results
-
-
Constructor Details
-
Test
-
Test
-
Test
public Test() -
Test
public Test(TestResult.Status status, String id, String description, Test.Severity severity, String category, String component, String field, String comments, String scope, String source, String specId, String specUrl, String ruleNumber, String ruleUrl, String exampleValid, String exampleInvalid, String exceptions, String exceptionLabels, String notes, boolean ran, float runtime, long start, List<TestResult> results) Creates a newTest
instance.- Parameters:
status
-id
-description
-severity
-category
-component
-field
-comments
-scope
-source
-specId
-specUrl
-ruleNumber
-ruleUrl
-exampleValid
-exampleInvalid
-exceptions
-exceptionLabels
-notes
-ran
-runtime
- Test runtime in seconds.start
-results
-
-
-
Method Details
-
startTest
public void startTest()Starts the test and stores the current time for the test runtime calculation. -
startTest
Starts the test and stores the current time for the test runtime calculation. -
endTest
public void endTest()Marks the test as ran and calculates the runtime. -
countWarnings
public long countWarnings() -
countErrors
public long countErrors() -
countInfo
public long countInfo() -
countPassed
public long countPassed() -
builder
-
getStatus
-
getId
-
getDescription
-
getSeverity
-
getCategory
-
getComponent
-
getField
-
getComments
-
getScope
-
getSource
-
getSpecId
-
getSpecUrl
-
getRuleNumber
-
getRuleUrl
-
getExampleValid
-
getExampleInvalid
-
getExceptions
-
getExceptionLabels
-
getNotes
-
isRan
public boolean isRan() -
getRuntime
public float getRuntime()Test runtime in seconds. -
getStart
public long getStart() -
getResults
-
setStatus
-
setId
-
setDescription
-
setSeverity
-
setCategory
-
setComponent
-
setField
-
setComments
-
setScope
-
setSource
-
setSpecId
-
setSpecUrl
-
setRuleNumber
-
setRuleUrl
-
setExampleValid
-
setExampleInvalid
-
setExceptions
-
setExceptionLabels
-
setNotes
-
setRan
public void setRan(boolean ran) -
setRuntime
public void setRuntime(float runtime) Test runtime in seconds. -
setStart
public void setStart(long start) -
setResults
-
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-