Class SkipJunit

java.lang.Object
org.infinispan.commons.test.skip.SkipJunit
All Implemented Interfaces:
org.junit.rules.TestRule

public class SkipJunit extends Object implements org.junit.rules.TestRule
Use as a @Rule or @ClassRule to skip all methods in a class on some OSes.
  • Constructor Summary

    Constructors
    Constructor
    Description
    SkipJunit(int jdkMajorVersion)
     
    SkipJunit(OS... oses)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.junit.runners.model.Statement
    apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
     
    static void
    onlyOnOS(OS... oses)
    Use within a @Test method to run this test only on certain OSes.
    static void
    skipOnOS(OS... oses)
    Use within a @Test method to skip that method on some OSes.
    static void
    skipSinceJDK(int major)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SkipJunit

      public SkipJunit(OS... oses)
    • SkipJunit

      public SkipJunit(int jdkMajorVersion)
  • Method Details

    • apply

      public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
      Specified by:
      apply in interface org.junit.rules.TestRule
    • skipOnOS

      public static void skipOnOS(OS... oses)
      Use within a @Test method to skip that method on some OSes. Use in a @BeforeClass method to skip all methods in a class on some OSes.
    • onlyOnOS

      public static void onlyOnOS(OS... oses)
      Use within a @Test method to run this test only on certain OSes. Use in a @BeforeClass method to run all methods in a class only on some OSes.
    • skipSinceJDK

      public static void skipSinceJDK(int major)