org.apache.sling.hc.junitbridge

## Class HealthCheckTestsProvider

- java.lang.Object
- - org.apache.sling.hc.junitbridge.HealthCheckTestsProvider

All Implemented Interfaces:
  org.apache.sling.junit.TestsProvider

    @Service
    public class HealthCheckTestsProvider
    extends Object
    implements org.apache.sling.junit.TestsProvider

Bridge Health Checks into the Sling JUnit server-side test framework, based on their tags.

### Field Summary

Fields
`static String[]` `DEFAULT_TAG_GROUPS`
`static String` `PROP_TAG_GROUPS`
`static String` `TEST_NAME_PREFIX`
`static String` `TEST_NAME_SUFFIX`

### Constructor Summary

Constructors
Constructor and Description
`HealthCheckTestsProvider()`

### Method Summary

Methods
`protected void` `activate(org.osgi.service.component.ComponentContext ctx)`
`Class<?>` `createTestClass(String testName)`
`protected void` `deactivate()`
`String` `getServicePid()`
`List<String>` `getTestNames()`
`long` `lastModified()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### TEST_NAME_PREFIX

    public static final String TEST_NAME_PREFIX

See Also:
  Constant Field Values

#### TEST_NAME_SUFFIX

    public static final String TEST_NAME_SUFFIX

See Also:
  Constant Field Values

#### DEFAULT_TAG_GROUPS

    public static final String[] DEFAULT_TAG_GROUPS

#### PROP_TAG_GROUPS

    @Property(cardinality=2147483647,
              label="Health Check Tags",
              description="Groups of health check tags to execute as JUnit tests. Use the standard Health Checks \'includeThisTag,-omitThatTag\' syntax")
    public static final String PROP_TAG_GROUPS

See Also:
  Constant Field Values

### Constructor Detail

#### HealthCheckTestsProvider

    public HealthCheckTestsProvider()

### Method Detail

#### activate

    @Activate
    protected void activate(org.osgi.service.component.ComponentContext ctx)

#### deactivate

    @Deactivate
    protected void deactivate()

#### createTestClass

    public Class<?> createTestClass(String testName)
                             throws ClassNotFoundException

Specified by:
  `createTestClass` in interface `org.apache.sling.junit.TestsProvider`
Throws:
  `ClassNotFoundException`

#### getServicePid

    public String getServicePid()

Specified by:
  `getServicePid` in interface `org.apache.sling.junit.TestsProvider`

#### getTestNames

    public List<String> getTestNames()

Specified by:
  `getTestNames` in interface `org.apache.sling.junit.TestsProvider`

#### lastModified

    public long lastModified()

Specified by:
  `lastModified` in interface `org.apache.sling.junit.TestsProvider`