Class Test

java.lang.Object
gov.niem.tools.api.validation.Test

public class Test extends Object
Information about a validation test.
  • Field Details

    • status

      public TestResult.Status status
    • id

      public String id
    • description

      public String description
    • severity

      public Test.Severity severity
    • category

      public String category
    • component

      public String component
    • field

      public String field
    • comments

      public String comments
    • scope

      public String scope
    • source

      public String source
    • specId

      public String specId
    • specUrl

      public String specUrl
    • ruleNumber

      public String ruleNumber
    • ruleUrl

      public String ruleUrl
    • exampleValid

      public String exampleValid
    • exampleInvalid

      public String exampleInvalid
    • exceptions

      public String exceptions
    • exceptionLabels

      public String exceptionLabels
    • notes

      public String notes
    • ran

      public boolean ran
    • runtime

      public float runtime
      Test runtime in seconds.
    • results

      public List<TestResult> results
  • Constructor Details

    • Test

      public Test(String id)
    • Test

      public Test(String id, String description)
    • 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 new Test 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

      public void startTest(Test.Severity severity)
      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

      public static Test.TestBuilder builder()
    • getStatus

      public TestResult.Status getStatus()
    • getId

      public String getId()
    • getDescription

      public String getDescription()
    • getSeverity

      public Test.Severity getSeverity()
    • getCategory

      public String getCategory()
    • getComponent

      public String getComponent()
    • getField

      public String getField()
    • getComments

      public String getComments()
    • getScope

      public String getScope()
    • getSource

      public String getSource()
    • getSpecId

      public String getSpecId()
    • getSpecUrl

      public String getSpecUrl()
    • getRuleNumber

      public String getRuleNumber()
    • getRuleUrl

      public String getRuleUrl()
    • getExampleValid

      public String getExampleValid()
    • getExampleInvalid

      public String getExampleInvalid()
    • getExceptions

      public String getExceptions()
    • getExceptionLabels

      public String getExceptionLabels()
    • getNotes

      public String getNotes()
    • isRan

      public boolean isRan()
    • getRuntime

      public float getRuntime()
      Test runtime in seconds.
    • getStart

      public long getStart()
    • getResults

      public List<TestResult> getResults()
    • setStatus

      public void setStatus(TestResult.Status status)
    • setId

      public void setId(String id)
    • setDescription

      public void setDescription(String description)
    • setSeverity

      public void setSeverity(Test.Severity severity)
    • setCategory

      public void setCategory(String category)
    • setComponent

      public void setComponent(String component)
    • setField

      public void setField(String field)
    • setComments

      public void setComments(String comments)
    • setScope

      public void setScope(String scope)
    • setSource

      public void setSource(String source)
    • setSpecId

      public void setSpecId(String specId)
    • setSpecUrl

      public void setSpecUrl(String specUrl)
    • setRuleNumber

      public void setRuleNumber(String ruleNumber)
    • setRuleUrl

      public void setRuleUrl(String ruleUrl)
    • setExampleValid

      public void setExampleValid(String exampleValid)
    • setExampleInvalid

      public void setExampleInvalid(String exampleInvalid)
    • setExceptions

      public void setExceptions(String exceptions)
    • setExceptionLabels

      public void setExceptionLabels(String exceptionLabels)
    • setNotes

      public void setNotes(String notes)
    • setRan

      public void setRan(boolean ran)
    • setRuntime

      public void setRuntime(float runtime)
      Test runtime in seconds.
    • setStart

      public void setStart(long start)
    • setResults

      public void setResults(List<TestResult> results)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object