public class

DefaultExamSystem

extends Object
implements ExamSystem
java.lang.Object
   ↳ org.ops4j.pax.exam.spi.DefaultExamSystem

Class Overview

DefaultExamSystem represents the default implementation of ExamSystem. It takes care of options (including implicit defaults), temporary folders (and their cleanup) and cross cutting parameters that are frequently used like "timeout" values.

Summary

Public Methods
void clear()
Clears up resources taken by system (like temporary files).
static ExamSystem create(Option[] options)
Creates a fresh ExamSystem.
String createID(String purposeText)
TestProbeBuilder createProbe()
boolean equals(Object obj)
ExamSystem fork(Option[] options)
Create a new system based on *this*.
File getConfigFolder()
<T extends Option> T[] getOptions(Class<T> optionType)
<T extends Option> T getSingleOption(Class<T> optionType)
Helper method for single options.
<T extends Option> T getSingleOption(Class<T> optionType, Option[] options)
File getTempFolder()
RelativeTimeout getTimeout()
int hashCode()
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.ops4j.pax.exam.ExamSystem

Public Methods

public void clear ()

Clears up resources taken by system (like temporary files).

public static ExamSystem create (Option[] options)

Creates a fresh ExamSystem. Your options will be combined with internal defaults. If you need to change the system after it has been created, you fork() it. Forking will not add default options again.

Parameters
options options to be used to define the new system.
Returns
  • a fresh instance of DefaultExamSystem
Throws
IOException in case of an instantiation problem. (IO related)

public String createID (String purposeText)

public TestProbeBuilder createProbe ()

Throws
IOException

public boolean equals (Object obj)

public ExamSystem fork (Option[] options)

Create a new system based on *this*. The forked System remembers the forked instances in order to clear resources up (if desired).

Throws
IOException

public File getConfigFolder ()

Returns
  • the basic directory that Exam should use to look at user-defaults.

public T[] getOptions (Class<T> optionType)

public T getSingleOption (Class<T> optionType)

Helper method for single options. Last occurence has precedence. (support overwrite).

public T getSingleOption (Class<T> optionType, Option[] options)

public File getTempFolder ()

Returns
  • the basic directory that Exam should use for all IO write activities.

public RelativeTimeout getTimeout ()

Returns
  • a relative indication of how to deal with timeouts.

public int hashCode ()

public String toString ()