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

org.testcontainers.spock.TestcontainersExtension.groovy Maven / Gradle / Ivy

package org.testcontainers.spock

import org.spockframework.runtime.extension.AbstractAnnotationDrivenExtension
import org.spockframework.runtime.model.SpecInfo

class TestcontainersExtension extends AbstractAnnotationDrivenExtension {

    @Override
    void visitSpecAnnotation(Testcontainers annotation, SpecInfo spec) {
        def interceptor = new TestcontainersMethodInterceptor(spec)
        spec.addSetupSpecInterceptor(interceptor)
        spec.addCleanupSpecInterceptor(interceptor)
        spec.addSetupInterceptor(interceptor)
        spec.addCleanupInterceptor(interceptor)
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy