Class PreconditionContext

java.lang.Object
org.spockframework.runtime.extension.builtin.PreconditionContext

public class PreconditionContext extends Object
The context (delegate) for a Requires or IgnoreIf condition.
  • Constructor Details

    • PreconditionContext

      public PreconditionContext()
  • Method Details

    • getEnv

      public Map<String,String> getEnv()
      Returns the current JVM's environment variables.
      Returns:
      the current JVM's environment variables
    • getSys

      public Properties getSys()
      Returns the current JVM's system properties.
      Returns:
      the current JVM's system properties
    • getProperties

      @Deprecated public Properties getProperties()
      Deprecated.
      use getSys() instead
      Returns the current JVM's system properties.
      Returns:
      the current JVM's system properties
    • getOs

      public OperatingSystem getOs()
      Returns the current operating system.
      Returns:
      the current operating system
    • getJvm

      public Jvm getJvm()
      Returns the current JVM.
      Returns:
      the current JVM
    • getJavaVersion

      public BigDecimal getJavaVersion()
      Returns the current JVM's Java specification version. Examples for valid values are 1.6 and 1.7.
      Returns:
      the current JVM's Java specification version