org.sonar.api.batch.sensor.test.internal
Class DefaultTestCaseExecution

java.lang.Object
  extended by org.sonar.api.batch.sensor.internal.DefaultStorable
      extended by org.sonar.api.batch.sensor.test.internal.DefaultTestCaseExecution
All Implemented Interfaces:
TestCaseExecution

public class DefaultTestCaseExecution
extends DefaultStorable
implements TestCaseExecution


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.sonar.api.batch.sensor.test.TestCaseExecution
TestCaseExecution.Status, TestCaseExecution.Type
 
Field Summary
 
Fields inherited from class org.sonar.api.batch.sensor.internal.DefaultStorable
storage
 
Constructor Summary
DefaultTestCaseExecution()
           
DefaultTestCaseExecution(SensorStorage storage)
           
 
Method Summary
 void doSave()
           
 Long durationInMs()
          Duration in milliseconds
 DefaultTestCaseExecution durationInMs(long duration)
          Duration in milliseconds
 boolean equals(Object obj)
           
 int hashCode()
           
 DefaultTestCaseExecution inTestFile(InputFile testFile)
          Set file where this test is located.
 String message()
          Message (usually in case of TestCaseExecution.Status.ERROR or TestCaseExecution.Status.FAILURE).
 DefaultTestCaseExecution message(String message)
          Message (usually in case of TestCaseExecution.Status.ERROR or TestCaseExecution.Status.FAILURE).
 String name()
          Name of this test case.
 DefaultTestCaseExecution name(String name)
          Set name of this test.
 DefaultTestCaseExecution ofType(TestCaseExecution.Type type)
          Type of test.
 String stackTrace()
          Stacktrace (usually in case of TestCaseExecution.Status.ERROR).
 DefaultTestCaseExecution stackTrace(String stackTrace)
          Set stacktrace (usually in case of TestCaseExecution.Status.ERROR).
 TestCaseExecution.Status status()
          Status of execution of the test.
 DefaultTestCaseExecution status(TestCaseExecution.Status status)
          Status of execution of the test.
 InputFile testFile()
          InputFile where this test is located.
 TestCaseExecution.Type type()
          Type of test.
 
Methods inherited from class org.sonar.api.batch.sensor.internal.DefaultStorable
save, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.sonar.api.batch.sensor.test.TestCaseExecution
save
 

Constructor Detail

DefaultTestCaseExecution

public DefaultTestCaseExecution()

DefaultTestCaseExecution

public DefaultTestCaseExecution(SensorStorage storage)
Method Detail

inTestFile

public DefaultTestCaseExecution inTestFile(InputFile testFile)
Description copied from interface: TestCaseExecution
Set file where this test is located. Mandatory.

Specified by:
inTestFile in interface TestCaseExecution

name

public DefaultTestCaseExecution name(String name)
Description copied from interface: TestCaseExecution
Set name of this test. Name is mandatory.

Specified by:
name in interface TestCaseExecution

durationInMs

public DefaultTestCaseExecution durationInMs(long duration)
Description copied from interface: TestCaseExecution
Duration in milliseconds

Specified by:
durationInMs in interface TestCaseExecution

status

public DefaultTestCaseExecution status(TestCaseExecution.Status status)
Description copied from interface: TestCaseExecution
Status of execution of the test.

Specified by:
status in interface TestCaseExecution

message

public DefaultTestCaseExecution message(@Nullable
                                        String message)
Description copied from interface: TestCaseExecution
Message (usually in case of TestCaseExecution.Status.ERROR or TestCaseExecution.Status.FAILURE).

Specified by:
message in interface TestCaseExecution

ofType

public DefaultTestCaseExecution ofType(TestCaseExecution.Type type)
Description copied from interface: TestCaseExecution
Type of test.

Specified by:
ofType in interface TestCaseExecution

stackTrace

public DefaultTestCaseExecution stackTrace(@Nullable
                                           String stackTrace)
Description copied from interface: TestCaseExecution
Set stacktrace (usually in case of TestCaseExecution.Status.ERROR).

Specified by:
stackTrace in interface TestCaseExecution

testFile

public InputFile testFile()
Description copied from interface: TestCaseExecution
InputFile where this test is located.

Specified by:
testFile in interface TestCaseExecution

durationInMs

@CheckForNull
public Long durationInMs()
Description copied from interface: TestCaseExecution
Duration in milliseconds

Specified by:
durationInMs in interface TestCaseExecution

type

public TestCaseExecution.Type type()
Description copied from interface: TestCaseExecution
Type of test.

Specified by:
type in interface TestCaseExecution

status

public TestCaseExecution.Status status()
Description copied from interface: TestCaseExecution
Status of execution of the test.

Specified by:
status in interface TestCaseExecution

name

public String name()
Description copied from interface: TestCaseExecution
Name of this test case.

Specified by:
name in interface TestCaseExecution

message

@CheckForNull
public String message()
Description copied from interface: TestCaseExecution
Message (usually in case of TestCaseExecution.Status.ERROR or TestCaseExecution.Status.FAILURE).

Specified by:
message in interface TestCaseExecution

stackTrace

@CheckForNull
public String stackTrace()
Description copied from interface: TestCaseExecution
Stacktrace (usually in case of TestCaseExecution.Status.ERROR).

Specified by:
stackTrace in interface TestCaseExecution

doSave

public void doSave()
Specified by:
doSave in class DefaultStorable

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2009–2015 SonarSource. All rights reserved.