All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.arquillian.testcontainers.api.DockerRequired Maven / Gradle / Ivy

/*
 * Copyright The Arquillian Authors
 * SPDX-License-Identifier: Apache-2.0
 */
package org.jboss.arquillian.testcontainers.api;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * An annotation which will check if docker is available and if not throw an exception. By default, this will throw an
 * {@link AssertionError}. However, you can define the type of exception to throw. The exception must
 * have a string or no-arg constructor.
 *
 * 
 *     {@code @DockerRequired(TestAbortedException.class)}
 * 
*/ @Inherited @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.TYPE }) public @interface DockerRequired { /** * The type of the exception to throw. The exception must have a public string constructor. *

* By default this throws an {@link AssertionError} error. However, this could throw, for example, a * {@code TestAbortedException} to act as an Assumption error. *

* * @return the exception type to throw if docker is not available */ Class value() default AssertionError.class; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy